Home
Manage Your Code
Snippet: Style information for a DIV container that'll center your stuff in a webpage (CSS)
Title: Style information for a DIV container that'll center your stuff in a webpage Language: CSS
Description: I found this on flumpcakes.co.uk, if you create a div on your webpage with an id of container then this bit of code in your stylesheet will center your page. Views: 134
Author: Mike Furmedge Date Added: 3/26/2009
Copy Code  
body {text-align: center; /* for IE */}
	
#container {
	margin: 0 auto;   /* align for good browsers */
	text-align: left; /* counter the body center */
	width: 80%;
	min-width:800px;
}
Notes
I'd advise visiting flumpcakes if you need help on this - they blatantly know much more about css than me :) http://flumpcakes.co.uk/css/