|
CSS Positioning, probably an easy fix, help!
Hey all... I'm new to css positioning, and I can't seem to get past the seemingly simple snag. Here's my css and html page. Everything looks peachy in IE, but not in Firefox. I know, Firefox is reading it correctly most likely, but I'm concerned over the fact that they are rendering differently, not which one is correct : ) I'm sure my approach is all hacked up as well!
How can I get my spans to line correctly? There should be a header bar, left nav, and body, all with a uniform spacing around the common edges. You'll see what I mean if you load the html.
TIA,
Bryan
HTML:
<html>
<head>
<title>CSS Site</title>
<link href="site.css" rel="stylesheet" type="text/css">
</head>
<body>
<span class="header">This is my title</span>
<span class="leftNav">Test</span>
<span class="content">More text</span>
</body>
</html>
CSS:
.header {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
font-weight:bold;
color:#fff;
padding: 5px;
width:750px;
background-color:#c5c5c5;
border: 1px solid #000;
position:absolute;
left:1em;
top:1em;
}
.leftNav {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
color:#fff;
padding: 5px;
width:126px;
background-color:#999;
border: 1px solid #000;
position:absolute;
left:1em;
top:3.8em;
}
.content {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
color:#000;
padding: 5px;
width:619px;
height:500px;
background-color:#f4f4f4;
border: 1px solid #000;
position:absolute;
left:14.1em;
top:3.8em;
}
|