Problem with CSS DIV align
- by Sergio
If the doctype declaration is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> what is the best way for horizontal alignment of the DIV's like these:
<div id="outer"><div id="inner">Some text</div></div>
The CSS is:
#outer{ border-top:1px dotted #999; background-color: #F4F4F4; width:100%;}
#inner{ width:500px;border:1px solid #F00; margin:auto;}
The thing that I want to do is the inner DIV align at center (horizontally) inside the outer DIV. This CSS working fine if the doctype declaration is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">