Forum Moderators: not2easy
If you can, please view in both IE and FF and explain to me why it dosn't look the same in FF.
My css code is the following:
html,body {
margin: 0px;
padding: 0px;
background-color: white;
}#bodyframe {
width:940px;
margin: 0px auto;
background-color: blue;
border: 2px solid black;
}
#shadow {
width:740px;
margin: 0px auto;
float:left;
min-height: 100%;
background-color: black;
}
#right {
width:100px;
margin: 0px auto;
float:right;
height: 100%;
background-color: grey;
}
#topright
{
width: 100px;
height:100px;
margin: 0px auto;
background-color: green;
}
#ad
{
width: 100px;
margin: 0px auto;
border: 1px solid gray;
line-height: 130%;
height: 100%;
background-color: white;
}
#container
{
margin: 0px auto;
width:700px;
height: 100%;
background-color: orange;
}
#header
{
width: 700px;
height:200px;
padding:0px;
margin: 0px auto;
background-color: #ddd;
}
#menu
{
width: 700px;
height:150px;
margin: 0px auto;
border: 1px solid gray;
line-height: 130%;
height: 100%;
background-color: red;
}
#main
{
width: 700px;
margin: 0px auto;
border: 1px solid gray;
line-height: 130%;
height: 100%;
background-color: blue;
}
#footer
{
width: 700px;
margin: 0px auto;
border: 1px solid gray;
line-height: 130%;
height: 100%;
background-color: yellow;
}
The html layout is:
<div id="bodyframe">
<div id="shadow">
<div id="container">
<div id="header">
</div>
<div id="menu">
</div>
<div id="main">
</div>
<div id="footer">
</div>
</div>
</div><div id="right">
<div id="topright">
</div>
<div id="ad">
</div>
</div>
</div>
I tried adding "clear" to some divs within the container but dosn't seem to get it right. Any clue on where to put it.
And yes, FF is right and my code is wrong. That I understod the second it seemed to work in IE :)
>><br clear="all" /> <<
should be <br clear="both" />
clear="all" isn't a valid attribute for clearing floats. Also, the syntax for the clearing is incorrect.
You shouldmake it simple, and just stick in the br tag like so:
<br class="clear" />
and in the stylesheet:
br.clear {
clear:both;}
That should validate and degrade well.