View Full Version : Um What is CSS lol (Detect Resolution HELP)

01-08-2004, 06:43 AM
Hi I am building a site (of course) and obviously after reading for the past two hours realize I know nothing.

I want my site to fit in all resolutions. First I tried to build the site in 800x600 to accomodate the other resolutions. Yes it fits in 1024 but its all the way to the left and much room to the right remains. How does one simply (if possible) create that CSS file needed, then what do I do with it. And what script is needed to detect screen resolution and what do I do with that. Sorry if I sound like a retard. Please help and thanks in advance.

I just want my site to adjust and center to the different resolutions. I will absolutely love anyone that helps me.

Thanks again,

01-08-2004, 09:00 AM
Here's what I do:

Tell the body tag to text-align:center;
Create the element you want centered (generally a div in standards-compliant design), and give it an explicit width (width:720px)
On that same element, set the top and bottom margins to whatever you want. Set the left and right both to auto.
Tell that element to use text-align:left to cancel out the effect the body tag will have on the text.

Voila! A centered div!

01-08-2004, 11:02 AM