Aush
02-25-2010, 09:42 PM
Hey there, I am having a small problem everytime I try to make a page like this. The navbar will move up when I make the page bigger, and it will act weirdly and create extra pixels and such when I make it smaller. Please help! I validated everything, I would just like to know why it is doing this. Thanks a ton. I really appreciate it!
Html:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="web.css">
<title>Sample</title>
</head>
<body>
<div id="top">
<img src="samplebanner.png" width="750" height="150" alt="Banner">
</div>
<div class="navbar">
<ul>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
</ul>
</div>
</body>
</html>
Css:
.navbar ul
{
position: absolute;
text-decoration: none;
background-color: aqua;
background-image: none;
padding-left: 0px;
top: 143px;
}
.navbar li
{
list-style-type: none;
border-style: solid;
border-color: black;
border-width: 1px;
border-bottom: 0px;
}
img
{
border-style: solid;
border-color: black;
border-width: 1px;
position: absolute;
}
Thank you so much for all of your help!
Html:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="web.css">
<title>Sample</title>
</head>
<body>
<div id="top">
<img src="samplebanner.png" width="750" height="150" alt="Banner">
</div>
<div class="navbar">
<ul>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
<li>Link</li>
</ul>
</div>
</body>
</html>
Css:
.navbar ul
{
position: absolute;
text-decoration: none;
background-color: aqua;
background-image: none;
padding-left: 0px;
top: 143px;
}
.navbar li
{
list-style-type: none;
border-style: solid;
border-color: black;
border-width: 1px;
border-bottom: 0px;
}
img
{
border-style: solid;
border-color: black;
border-width: 1px;
position: absolute;
}
Thank you so much for all of your help!