seanybravo
IS-IT--Management
I am training myself to use css in my web pages and everytime I think that I am getting an understanding of it something does not work as expected. Could someone please tell me why there is a gap between the header and the Navigation Divs? My knowledge of css tells me that there should not.
I hae tried both Mac Safari 1.3.1 and PC IE 6.0.2.
If anyone can offer an explination why this is happening I would be very grateful. There is only a small amount of code.
Thanks
Sean
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Page Layout Tutorial</title>
<style type="text/css">
<!--
Body{ background-image:url(Background.gif); text-align:center;
}
#wrapper{background-color:#FFFFFF; width:600px; margin-left:auto; margin-right:auto; padding:0px;
}
#footer{ background-color:#000066; color:#FFFFFF; width:600px;
}
#header{ padding:0px; margin:0px;
}
#navigation{ padding:0px; margin:0px 0 0 0px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header"><img src="Header.jpg" width="600" height="100" /></div>
<div id="navigation"><ul id="navlist"><li id="active"><a href="#" id="current">Home</a></li>
<li><a href="#">Page1</a></li>
<li><a href="#">Page2</a></li>
<li><a href="#">Page3</a></li>
</ul>
</div>
<div id="footer">
Footer
</div>
</div>
</body>
</html>
I hae tried both Mac Safari 1.3.1 and PC IE 6.0.2.
If anyone can offer an explination why this is happening I would be very grateful. There is only a small amount of code.
Thanks
Sean
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Page Layout Tutorial</title>
<style type="text/css">
<!--
Body{ background-image:url(Background.gif); text-align:center;
}
#wrapper{background-color:#FFFFFF; width:600px; margin-left:auto; margin-right:auto; padding:0px;
}
#footer{ background-color:#000066; color:#FFFFFF; width:600px;
}
#header{ padding:0px; margin:0px;
}
#navigation{ padding:0px; margin:0px 0 0 0px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header"><img src="Header.jpg" width="600" height="100" /></div>
<div id="navigation"><ul id="navlist"><li id="active"><a href="#" id="current">Home</a></li>
<li><a href="#">Page1</a></li>
<li><a href="#">Page2</a></li>
<li><a href="#">Page3</a></li>
</ul>
</div>
<div id="footer">
Footer
</div>
</div>
</body>
</html>