>Center HTML/Webpage

>To center your webpage its simple. By setting the width and margin you can achieve this. However, depending on the browser (Internet Explorer) you must include the doctype or it will not work. See the code below

<!DOCTYPE html>
<html>
<body>
<head>
<style>
    #main { 
	    width: 900px; 
        margin: 0 auto; 
    }
</style>
</head>
<body>
    <div id="main">
    </div>
</body>
</html>

resource:
http://www.tipue.com/blog/center-a-div/

Leave a Reply