PDA

View Full Version : floating webpage



jtr8151
02 May 2006, 05:12 PM
Ok guys im new to these forums so bare w/ me if this has already been answered. I am designing a webpage @ a standard 800*600 and instead of having the webpage appear to the left side of the page when someone has a higher resolution than 800*600 i would like the page to be in the center... i heard once that this was called floating? I may be completly wrong. Buth either way i am using Dreamweaver and would like some help. Thanks all

~Justin

josiahrock
02 May 2006, 08:51 PM
Ok guys im new to these forums so bare w/ me if this has already been answered. I am designing a webpage @ a standard 800*600 and instead of having the webpage appear to the left side of the page when someone has a higher resolution than 800*600 i would like the page to be in the center... i heard once that this was called floating? I may be completly wrong. Buth either way i am using Dreamweaver and would like some help. Thanks all

~Justin


You need to use CSS.
First create a div id in your html document and then define the width and height if needed in your css file.
Then define the left and right margins as "auto" so it will look like this in your css file:

#wrapper {
height: 600px;
width: 800px;
margin-right: auto;
margin-left: auto;
}


and this in your html:

<div id="wrapper">Content for id "wrapper" Goes Here</div>

hope this helps