Nav bar problems

BartBaard

New Member
Hello guys,
I'm designing a website for practice and have a problem:

www.bartsite.woelmuis.nl/sinterbaas/index.html

I got the navbar to the left with float:left but it is creating a space between the actual content and the bar, it is seperated.
I want the nav bar to be in the left upper corner right under the header within the conent area and the footer underneath.

HTML:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sinterbaas - Baziger kan niet.</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="container">
<div id="header">
<img src="logo.png" class="logo" alt="Sinterbaas"/>
</div>
<div id="headerbar">
</div>
<div id="content">
<div id="navcontainer">
<ul id="navlist">
<li><a href="http://www.google.com/">Google</a></li>
<li><a href="http://www.yahoo.com/">Yahoo</a></li>
<li><a href="http://www.bing.com/">Bing</a></li>
<li><a href="http://www.vimeo.com/">Vimeo</a></li>
<li><a href="http://www.youtube.com/">YouTube</a></li>
</ul>
</div>
<h1 class="areatitle">Sinterbaas</h1>
<p class="areatext">
Sinterbaas is een baas.<br><br><br><br><br><br><br><br><br> Test.
</p>
</div>
<div id="footer">
</div>
</div>
</body>
</html>

CSS:
Code:
body
{
background: #FFFFFF;
margin: 0;
font-family: "Verdana";
font-size: 11px;
}

#container
{
text-align: left;
width: 800px;
height: 600px;
margin: auto;
overflow: hidden;
border-left: 1px solid #999999;
border-right: 1px solid #999999;
}

#header
{
width: 100%;
height: 120px;
background: url('header_bg.png');
}

img.logo
{
margin-left: 15px;
}

#headerbar
{
width: 100%;
height: 3px;
background: url('headerbar.png');
}

#navcontainer
{
background: #ffffff;
width: 20%;
float:left;
margin: 0 auto;
padding: 1em 0;
font-family: georgia, serif;
font-size: 11px;
text-align: center;
text-transform: capitalize;
}

ul#navlist
{
text-align: left;
list-style: none;
padding: 0;
margin: 0 auto;
width: 70%;
}

ul#navlist li
{
display: block;
margin: 0;
padding: 0;
}

ul#navlist li a
{
display: block;
width: 100%;
padding: 0.5em 0 0.5em 2em;
border-width: 1px;
border-color: #ffe #aaab9c #ccc #fff;
border-style: solid;
color: #777;
text-decoration: none;
background: #f7f2ea;
}

#navcontainer>ul#navlist li a { width: auto; }


ul#navlist li a:hover, ul#navlist li#active a:hover
{
color: #800000;
background: transparent;
border-color: #aaab9c #fff #fff #ccc;
}

#content
{
width: 100%;
}

h1.areatitle
{
font-size: 18px;
font-weight: normal;
color: #330033;
font-weight: bold;
border-bottom: 1px dashed #CCCCCC;
margin-bottom: 5px;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
padding: 0;
}

p.areatext
{
margin: 0;
padding: 0;
margin-left: 10px;
margin-right: 10px;
text-align: justify;
}

#footer
{
text-decoration: none;
color: #ffffff;
font-weight: bold;
font-size: 6px;
line-height: 20px;
text-align: center;
width: 100%;
border-top: 1px solid #CCCCCC;
border-bottom: 1px solid #999999;
height: 10px;
margin-top: 30px;
background: url('footer_bg.png');
}


I've tried out a lot of things but just can't figure it out.
 
Last edited:

ronaldroe

Super Moderator
Staff member
I get a 502 error when I try to load the site, and I'm having a hard time finding the issue just looking at your code. I did notice that the content isn't wrapped in it's own div. That may be part of the issue.
 

Phreaddee

Super Moderator
Staff member
taking a stab in the dark you have this padding value on the navcontainer
padding: 1em 0;
I'd hazard a guess that that will be adding some space.

as with ronald, I too received a 502 error. so cant see the site in action...
 
Top