Tutorials-Nuval Web Design

  • Increase font size
  • Default font size
  • Decrease font size
Home Web Design Centering a page in non-standards compliant browsers

Centering a page in non-standards compliant browsers

E-mail Print PDF

Here are a couple techniques to center your CSS layout in non-standards compliant browsers (IE <8 I'm talking to you!):

 

Centering the layout on the page

1. IE 5.x and IE 6 quirks mode:

set the body tag to text-align: center (all body elements are centered)

reset the #wrapper div text-align: left

2. Netscape 6, prevent left side of wrapper from spilling off to the side of the page (cannot be accessed without this hack)

add min-width tag to body element

Last Updated on Tuesday, 16 February 2010 23:41  

Polls

Favorite Web Page Authoring Software?