Widths

Discussion in 'HTML' started by Chris, Nov 11, 2006.

  1. Chris

    Chris Guest

    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!
    Chris, Nov 11, 2006
    #1
    1. Advertising

  2. Chris

    Ben C Guest

    On 2006-11-11, Chris <> 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.
    Ben C, Nov 11, 2006
    #2
    1. Advertising

  3. Chris

    dorayme Guest

    In article <>,
    Ben C <> wrote:

    > On 2006-11-11, Chris <> 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
    dorayme, Nov 11, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    More Elegant Column Widths in ASP:Table Objects?

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, May 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    547
    Jason DeFontes
    May 14, 2004
  2. Dot net work
    Replies:
    2
    Views:
    1,552
    Dot Net Work
    May 20, 2004
  3. sck10

    Data Grid Column Widths

    sck10, Nov 8, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    7,707
    Steven Cheng[MSFT]
    Nov 15, 2004
  4. wh1974
    Replies:
    1
    Views:
    1,563
    =?Utf-8?B?RmVybmFuZG8gSHVudGg=?=
    Jan 11, 2005
  5. darrel
    Replies:
    1
    Views:
    269
    Eliyahu Goldin
    Jan 26, 2005
Loading...

Share This Page