Widths

C

Chris

I am designing a CSS driven website. Everything works in my layout. I want a
stretchy percentage driven width to my page. This works fine on 100% width
but what I want is my layout to stretch with browser widths up 1024 px width
and stop there. On wide screens it stretches too much making the lines of
text too wide. How can get it to stretch to 100% at 800 and 1024 but any
wider to stop at 1024. I have tried putting a 100% div within one with a
width of 1024 but this doesn't work. Also it needs to work in IE 5.5 and
above so any hacks would be appreciated!
 
B

Ben C

I am designing a CSS driven website. Everything works in my layout. I want a
stretchy percentage driven width to my page. This works fine on 100% width
but what I want is my layout to stretch with browser widths up 1024 px width
and stop there. On wide screens it stretches too much making the lines of
text too wide. How can get it to stretch to 100% at 800 and 1024 but any
wider to stop at 1024. I have tried putting a 100% div within one with a
width of 1024 but this doesn't work. Also it needs to work in IE 5.5 and
above so any hacks would be appreciated!

The max-width property is the obvious way to do this, but I don't think
it works in IE, and I don't know the hacks.
 
D

dorayme

Ben C said:
The max-width property is the obvious way to do this, but I don't think
it works in IE, and I don't know the hacks.

It works for IE 7, for less there are are choices: you can talk
to IE less in the css or html and modify what you want these to
show, possibly fixed width for them or whatever. To get the max
and min width roughly as in good browsers there is this:


#wrap
{
min-width: 800px;
max-width: 1024px;
width:expression(document.body.clientWidth < 800? "800px" :
document.body.clientWidth > 1024? "1024px" : "auto");
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top