Forum Moderators: not2easy
I try to center a block only horizontally using :
.conteneur {
height: 435px;
width: 689px;
margin: 0 auto;
text-align: left;
}
IE works fine but Firefox center the block not only horizontally but vertically too!
How to avoid that? I want my block to stay at the top vertically in firefox.
Thank you very much for your help.
Sounds like a body and padding issue. Set the body
body {
margin: 0;
padding: 0;
}
and add
.conteneur {
height: 435px;
width: 689px;
margin: 0 auto;
text-align: left;
padding: 0;
}
Remember, different browser clients have different defaults for their margins and padding in all elements. This is most obvious with <h> tags.
Marshall