I'm working on a web site, and every thing is fine except when I added the navagation bar......for some reason it pushes my navagation bar away from the border, which is odd because there's no reason it should be doing this. Here's the code:
[HTML]
[code=hml]
<html>
<head>
<style type="text/css">
body {
background-color:#000000;
}
.main {
border:1px solid #e00000;
width:100%;
height:100%;
position:relati ve;
overflow:auto;
}
.left {
float:left;
width:25%;
height:100%;
border-right:1px solid #e00000;
}
.middle {
float:left;
width:50%;
height:100%;
}
.right {
float:right;
width:25%;
height:100%;
border-left:1px solid #e00000;
}
ul {
float:left;
margin:0 auto;
list-style-type:none;
}
a {
float:left;
text-decoration:none ;
color:#e00000;
background-color:#000000;
padding:0.2em 0.6em;
border:1px solid #e00000;
font-size:17px;
}
a:hover {
float:left;
color:#000000;
background-color:#e00000;
border:1px solid #000000;
}
li {
display:inline;
}
</style>
</head>
<body>
<div class="main">
<div class="left">
</div>
<div class="middle">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</ul>
</diV>
<div class="right">
</div>
</div>
</body>
</html>[/code]
Also when I add a DOC type to this it litteraly SQUISHES every thing together and then I don't have the navagation problem any more XD!
Here's the DOC type I'm using:
[CODE=html]<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">[/CODE]
Thanks, Death
[HTML]
[code=hml]
<html>
<head>
<style type="text/css">
body {
background-color:#000000;
}
.main {
border:1px solid #e00000;
width:100%;
height:100%;
position:relati ve;
overflow:auto;
}
.left {
float:left;
width:25%;
height:100%;
border-right:1px solid #e00000;
}
.middle {
float:left;
width:50%;
height:100%;
}
.right {
float:right;
width:25%;
height:100%;
border-left:1px solid #e00000;
}
ul {
float:left;
margin:0 auto;
list-style-type:none;
}
a {
float:left;
text-decoration:none ;
color:#e00000;
background-color:#000000;
padding:0.2em 0.6em;
border:1px solid #e00000;
font-size:17px;
}
a:hover {
float:left;
color:#000000;
background-color:#e00000;
border:1px solid #000000;
}
li {
display:inline;
}
</style>
</head>
<body>
<div class="main">
<div class="left">
</div>
<div class="middle">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</ul>
</diV>
<div class="right">
</div>
</div>
</body>
</html>[/code]
Also when I add a DOC type to this it litteraly SQUISHES every thing together and then I don't have the navagation problem any more XD!
Here's the DOC type I'm using:
[CODE=html]<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">[/CODE]
Thanks, Death
Comment