How to center a web page, in ALL browsers (using CSS)

Hello Friends,

Below is CSS solution to center your website in ALL Browsers.

/*CSS to BODY TAG*/
body{
    text-align:center;
}

/*CSS to main Container TABLE or DIV or any PlaceHolder TAG of the web page*/
#container{
    width:500px;
    margin-left:auto;
    margin-right:auto;
    text-align:left;
}

 

Published Monday, May 26, 2008 2:31 PM by kaushalparik
Filed under:

Comments

# How to center a web page, in ALL browsers (using CSS)Hello Friends, « KaushaL.NET

Pingback from  How to center a web page, in ALL browsers (using CSS)Hello Friends, « KaushaL.NET