Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Warning: Deprecated HTML Tags and Attributes


mivox - 5:03 am on Apr 9, 2002 (gmt 0)


CENTERED CONTENT!!!! Ahh... I can breathe easy now...

#content { margin-right: 15%; margin-left: 15%; top: 80px }
<!-- top: 80px because I have a 72px tall header, aligned left -->
#textblock { font-size: 15px; line-height: 20px; font-family: Arial, Helvetica, Geneva; background: white url(http://domain.com/image.gif) repeat scroll; text-align: left; margin: 10px 15px; padding: 10px 15px; width: auto; overflow: visible; visibility: visible }

If you nest <div id="textblock"> INSIDE <div id="content">, #textblock ends up being a nice little "block" of contrasting background, filled with text, CENTERED on the page, in NN 4.7, IE 5.1 & Opera 5/Mac. Scales perfectly to page width on resize.

Dunno about the PC browsers, but I haven't had a really big problem with PC browsers mucking up my CSS. I think if you can get it right in NN, Opera and IE on either platform, your proverbial behind must be pretty well covered...


Thread source:: http://www.webmasterworld.com/html/1979.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com