PDA

View Full Version : How to keep a CSS page from expanding


Jittor
01-10-2006, 01:22 PM
I have been playing around with gmcrome's tableless CSS template trying to learn alittle more on external style sheets and not using tables. The template he made expands with the users browser window - is there a way to make it a fix width? would you do this in the external sheet? thanks all!

gmcrone
01-10-2006, 09:06 PM
There are 2 basic ways of doing this.

1. If you don't need your page centered, use containers (div, span, etc) set to absolute postioning with specific widths.

2. If you want your page centered.
See my article on the front page here on centering
Centering your page ('http://www.dreamweaverclub.com/css-center-content.php')

Then when defining your containers, make them a specified width.

wrapper= 760 px
header = 760 px
div left = 160 px float: left
main div = 600 px float: left
clear all
footer = 760 px

Mike...

Jittor
01-11-2006, 04:46 PM
gmcrone - thanks I will try that. I read your article on centering even through at this point I don't need it centered. It was good I will keep it in mind when I get to that point.

I liked your template by the way - it's a great starting point for me on learning CSS and seeing it all together. Thanks again