Beginner CSS Layout Help~
Posted: Fri, 2008-07-25 11:56
Hi Everyone,
As you can see this is my first post here.. So if i have post to the forum section please don't flame me.
Anyway, here is my question..
I just started to learn CSS from the internet and I would like to learn how to make a css layout to make my site become static?
What I'm trying to ask is... my site is designed by photoshop in 1024 x 768 and the problem is... if you are on a 800 x 600 resolution screen and the site will look a bit different.. like move a bit...
and i found this code from one of the template and dont know how to use it..
.main { width:800px;}
.min_width {width:expression(((document.documentElement.clientWidth || document.body.clientWidth) < 800)? "800px" : "100%"); min-width:800px;}
.min_height { width:0px; height:618px; float:left;}
#header {height:349px;}
#footer .bg{ height:98px;}
anyone can explain ?
Thanks and Appreciated a lot.


Regular
Posts: 36
Joined: 2008-03-13
Location: London
Well, i think it may be
Posted: Fri, 2008-07-25 16:22
Well, i think it may be better if you read the following. I found this page to be the most useful when i was learning CSS, purly because they explain exactly what they doing and why they doing it...and it's easy to follow
http://www.alistapart.com/articles/holygrail/
Enthusiast
Posts: 267
Joined: 2008-07-18
Location: US
Welcome! I assume you mean
Posted: Fri, 2008-07-25 19:44
Welcome!
I assume you mean your page fits in a 1024 window without drawing a horizontal scroll bar. However, when you view it in an 800 window, you get a horizontal scroll bar as the page is too wide at that resolution?
If that is the case there are any number of ways to resolve it. The method used will depend on the current structure of your layout. And whether, in fact, you even have a layout-- or just a photoshop comp. It would be best, in terms of a specific answer, to provide more information. A clickable link to the page in your post is always in your favor when seeking assistance.
Some of the code you've posted is CSS, and some is Javascript. The script (javascript) you have is a workaround to feed min-width and min-height to IE/6 and down. Those browsers do not support min/max declarations; consequently, the need for scripting. This is a valid and good method. But a bit advanced if you are new to CSS, and the peculiarities of non-supporting browsers.