|
Posted by dorayme on 11/11/06 20:40
In article <slrnelbt0v.f4r.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:
> On 2006-11-11, Chris <nospam@btinternet.com> wrote:
> > 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.
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");
}
--
dorayme
[Back to original message]
|