div
{
margin:90px auto;
}
This code centers the div in chrome with a top margin of 90px, but the results are different in all other browsers ..
is there a common method to center the div and have a top margin at the same time ?
div
{
margin:90px auto;
}
This code centers the div in chrome with a top margin of 90px, but the results are different in all other browsers ..
is there a common method to center the div and have a top margin at the same time ?
I assume you want the text content of the div to be aligned centred if so use.
div
{
margin:90px auto;
text-align:centre;
}
div {
margin: 90px auto;
width: 900px;
height: 100px;
}
This works for me in Firefox. I get a 900px by 100px box centered with a 90px top and bottom margin.