bytemedia
01-29-2008, 03:28 PM
Can someone take a look at my CSS and HTML and tell me why the layout lines up correctly in IE but not firefox? In IE the right side div (#content2) lines up beautifully with my header and left content div, but in firefox it is pushed to the bottom of the wrapper below the left content div. It seems like the div content2 is about 15 pixels wider in firefox than it is in IE. Can anyone give me a hand?
Here's my CSS:
}body {
margin: 0;
padding: 0;
background-color: #FFFFFF;
color: #000000;
}
#wrapper {
width: 800px;
background-color:#FFFFFF;
position:relative;
}
#banner {
width: 800px;
height: 150px;
background-color:#FFFFFF;
border-style:dotted;
border-width:2px;
border-color:#660033;
border-bottom-style:none;
}
#menu {
width: 800px;
height: 30px;
background-color:#660033;
color: White;
padding-top: 4px;
}
#content {
padding: 5px;
float: left;
width: 500px;
line-height: 1.1em;
text-align:justify;
background-color:#FFFFFF;
border-style:dotted;
border-width:2px;
border-color:#660033;
border-top-style: none;
}
#content2 {
padding: 5px;
float:right;
width: 300px;
line-height: 1.4em;
text-align:justify;
background-color:#FFFFFF;
border-style:dotted;
border-width:2px;
border-color:#660033;
border-top-style: none;
border-left-style: none;
Here's the HTML to go along with it:
<head>
<link rel="stylesheet" href="layout.css">
<title></title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body>
<center>
<div id="wrapper">
<div id="banner"></div>
<div id="menu"><font class="menu"><a class="menu" href="meetMV.htm">link here</a> | <a class="menu" href="vid.htm">
Videos</a> | <a class="menu" href="pic.htm">link here</a> | <a class="menu" href="article.htm">
link here</a> | <a class="menu" href="coach.htm">link here</a></font></div>
<div id="content">
<center><font class="header">Michael 411 Moment</font><br><font class="date">content here</font>
<p><font class="content">content here</font></p></center>
<hr>
<center><font class="header">content here</font><br>
<font class="date">By MVTL Staff 2007-01-29</font>
</center>
<font class="subHeader">content here</font>
<p><input type="checkbox" name="opt1" id="chk1"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt2" id="chk2"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt3" ID="chk3"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt4" ID="chk4"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt3" ID="chk5"><font class="content">content here</font><br>
<p><input type="submit" value="Submit" ID="Submit1" NAME="Submit1"></p>
</div>
<div id="content2"><font class="subHeader">Fast Fact</font><br>
<font class="content">content here</font>
</div>
</div>
</center>
</body>
Thanks in advance!
Here's my CSS:
}body {
margin: 0;
padding: 0;
background-color: #FFFFFF;
color: #000000;
}
#wrapper {
width: 800px;
background-color:#FFFFFF;
position:relative;
}
#banner {
width: 800px;
height: 150px;
background-color:#FFFFFF;
border-style:dotted;
border-width:2px;
border-color:#660033;
border-bottom-style:none;
}
#menu {
width: 800px;
height: 30px;
background-color:#660033;
color: White;
padding-top: 4px;
}
#content {
padding: 5px;
float: left;
width: 500px;
line-height: 1.1em;
text-align:justify;
background-color:#FFFFFF;
border-style:dotted;
border-width:2px;
border-color:#660033;
border-top-style: none;
}
#content2 {
padding: 5px;
float:right;
width: 300px;
line-height: 1.4em;
text-align:justify;
background-color:#FFFFFF;
border-style:dotted;
border-width:2px;
border-color:#660033;
border-top-style: none;
border-left-style: none;
Here's the HTML to go along with it:
<head>
<link rel="stylesheet" href="layout.css">
<title></title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body>
<center>
<div id="wrapper">
<div id="banner"></div>
<div id="menu"><font class="menu"><a class="menu" href="meetMV.htm">link here</a> | <a class="menu" href="vid.htm">
Videos</a> | <a class="menu" href="pic.htm">link here</a> | <a class="menu" href="article.htm">
link here</a> | <a class="menu" href="coach.htm">link here</a></font></div>
<div id="content">
<center><font class="header">Michael 411 Moment</font><br><font class="date">content here</font>
<p><font class="content">content here</font></p></center>
<hr>
<center><font class="header">content here</font><br>
<font class="date">By MVTL Staff 2007-01-29</font>
</center>
<font class="subHeader">content here</font>
<p><input type="checkbox" name="opt1" id="chk1"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt2" id="chk2"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt3" ID="chk3"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt4" ID="chk4"><font class="content">content here</font><br>
<input type="checkbox" NAME="opt3" ID="chk5"><font class="content">content here</font><br>
<p><input type="submit" value="Submit" ID="Submit1" NAME="Submit1"></p>
</div>
<div id="content2"><font class="subHeader">Fast Fact</font><br>
<font class="content">content here</font>
</div>
</div>
</center>
</body>
Thanks in advance!