What do I use to get netscape put the second div at the center of the first one in this code: <div style='width:900px;text-align:center;'> <div style='width:500px;'>one two three </div> </div> PHP: Seems that netscape ignors text-align:center.
{text-align: center;} aligns inline components, eg., um, text, not block level elements. IE in quirks mode exhibits the buggy behavior you seek. Put IE in standards mode, and it will get it right, too. <div style='width:900px; margin: 0 auto;'> <div style='width:500px;'> <p>one two three</p> </div> </div> Code (markup): You will need to use a complete and proper DTD to trigger standards mode in IE. If you've been coding for IE, look for breakage to occur when switched to following standards. There are some misguided souls who will suggest <div style='width:900px;text-align:center; margin: 0 auto;'> <div style='width:500px; text-align: left;'>one two three </div> </div> Code (markup): to allow the funky behavior, but using a mode whereby IE follows even fewer of the rules than normal and many of those wrongly is just asking for compatibility headaches. cheers, gary