Nedals
04-18-2003, 11:52 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body { margin:0px; background-color:#fff; }
#logo { float:left; background-color:#658da8; }
#header { text-align:right; padding-right:30px; background-color:#658da8; height:65px; }
#mainnav { text-align:right; padding-right:75px; background-color:#415B79; }
#subnav { color:#faa13c; text-align:right; padding-right:100px; background-color:#000; }
</style>
</head>
<body>
<div id="logo"><a href="index.html"><img src="images/logo.gif" alt="" width=187 height=65 border=0></a></div>
<div id="header">Some additional links</div>
<div id="mainnav"><a href="features.html"><img src="images/featureson.gif"alt="" width=100 height=17 border=0></a><a href="about.html"><img src="images/aboutus.gif"alt="" width=100 height=17 border=0></a></div>
<div id="subnav">Management <a href="track.html" class="subnav">Tracking</a></div>
</body>
</html>
Here's a relatively simple CSS layout. The problem I'm having is that when I add the height to the 'header' DIV, I get about a 3px
gap between the 'logo' and 'header' DIVs. If I take out the height, the gap closes but the other two DIVs move up under the 'header'
DIV.
Can someone show me the CORRECT way to do this layout. (and if possible make it render approximately in NS4)
It validated OK for 4.01 transitional but failed CSS validation and I don't understand why!
line 8: Parse error - Unrecognized
<html><head><title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
body { margin:0px; background-color:#fff; }
#logo { float:left; background-color:#658da8; }
#header { text-align:right; padding-right:30px; background-color:#658da8; height:65px; }
#mainnav { text-align:right; padding-right:75px; background-color:#415B79; }
#subnav { color:#faa13c; text-align:right; padding-right:100px; background-color:#000; }
</style>
</head>
<body>
<div id="logo"><a href="index.html"><img src="images/logo.gif" alt="" width=187 height=65 border=0></a></div>
<div id="header">Some additional links</div>
<div id="mainnav"><a href="features.html"><img src="images/featureson.gif"alt="" width=100 height=17 border=0></a><a href="about.html"><img src="images/aboutus.gif"alt="" width=100 height=17 border=0></a></div>
<div id="subnav">Management <a href="track.html" class="subnav">Tracking</a></div>
</body>
</html>
Here's a relatively simple CSS layout. The problem I'm having is that when I add the height to the 'header' DIV, I get about a 3px
gap between the 'logo' and 'header' DIVs. If I take out the height, the gap closes but the other two DIVs move up under the 'header'
DIV.
Can someone show me the CORRECT way to do this layout. (and if possible make it render approximately in NS4)
It validated OK for 4.01 transitional but failed CSS validation and I don't understand why!
line 8: Parse error - Unrecognized