mightypants
05-06-2008, 01:40 PM
I'm pretty new to all of this, but have read through most of the HTML/CSS tutorials on W3Cschools.com.
I'm trying to put the bulk of the material on a web page in a centered div. I set the div margins to auto, and width to 80%. With this setting, the div is centered, but obviously when the browser window is resized, the div changes width and text/images within move around as well. I know that I can use absolute positioning and width, but then, if I'm not mistaken, whether or not the div is centered will depend on the user's display resolution/browser window size.
How can I work around these issues? Thanks.
I'm trying to put the bulk of the material on a web page in a centered div. I set the div margins to auto, and width to 80%. With this setting, the div is centered, but obviously when the browser window is resized, the div changes width and text/images within move around as well. I know that I can use absolute positioning and width, but then, if I'm not mistaken, whether or not the div is centered will depend on the user's display resolution/browser window size.
How can I work around these issues? Thanks.