Been struggling with this for the last few days.
I have a div section that I would like to have centered on the page.
Code:
<div style="background-color:#EFEDE9; border-top:2px solid #D1D1E1; border-right:2px solid #D1D1E1; border-left:2px solid #D1D1E1; text-align:center;margin:0 auto;">
Want this section to be centered!
</div>
It works fine on IE6 and IE7 but on Firefox, the div does not appear centered.
I tried to include the div code in a table that I had centered but it still did NOT work.
The code:
Code:
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr><td align="center">
<div style="background-color:#EFEDE9; border-top:2px solid #D1D1E1; border-right:2px solid #D1D1E1; border-left:2px solid #D1D1E1; text-align:center;margin:0 auto;">
Want this section to be centered!
</div>
</td></tr>
</table>
still did NOT get the div centered.
I don't know what else to try.
If anyone has any suggestions, please let me know.