I would like to center a block, either a <span> or a <div>, on a page. I
tried different ways but failed to do that.
I would not want to do it with "position" property. Is there something
in CSS that would do something like "text-align:center;" to a block?
Thank you for your interest.
CSS
#center {
width: 200px;
margin-left: auto;
margin-right: auto;
}
HTML
<div id="center">
This should position the div in the center of the page without using the
"position: absolute" property.
It works fine in Firefox, but not always in IE.
Good luck.
Marco