CSS min-width property in IE?

Discussion in 'HTML' started by Deryck, Oct 10, 2004.

  1. Deryck

    Deryck Guest

    Hi,

    Is there a work-around to the min-width bug in IE? I'm looking for a
    solution that
    1, doesnt use javascript
    and
    2,doesnt fix the width in IE to whatever I want min-width to be

    TIA

    Deryck
     
    Deryck, Oct 10, 2004
    #1
    1. Advertising

  2. Deryck

    C A Upsdell Guest

    "Deryck" <> wrote in message
    news:...
    > Hi,
    >
    > Is there a work-around to the min-width bug in IE? I'm looking for a
    > solution that
    > 1, doesnt use javascript
    > and
    > 2,doesnt fix the width in IE to whatever I want min-width to be


    Well, you could always put in a 1px high transparent .gif or .png with the
    min-width that you want. Ugly, but it works.
     
    C A Upsdell, Oct 10, 2004
    #2
    1. Advertising

  3. Deryck

    Deryck Guest

    "C A Upsdell" <cupsdell0311XXX@-@> wrote in message
    news:...
    > Well, you could always put in a 1px high transparent .gif or .png with the
    > min-width that you want. Ugly, but it works.
    >

    Yeah, thanks. I might have to resort to that.

    I found this solution:
    http://www.antix.co.uk/code/css/imposing_minimum_width/default.htm and while
    the author's example does work I cannot get it to work at the resolution
    that I'd like it to. Does anyone understand this solution? I have never seen
    it mentioned anywhere else.

    Deryck
     
    Deryck, Oct 10, 2004
    #3
  4. Deryck

    C A Upsdell Guest

    "Deryck" <> wrote in message
    news:...
    >
    > "C A Upsdell" <cupsdell0311XXX@-@> wrote in message
    > news:...
    >> Well, you could always put in a 1px high transparent .gif or .png with
    >> the min-width that you want. Ugly, but it works.
    >>

    > Yeah, thanks. I might have to resort to that.
    >
    > I found this solution:
    > http://www.antix.co.uk/code/css/imposing_minimum_width/default.htm and
    > while the author's example does work I cannot get it to work at the
    > resolution that I'd like it to. Does anyone understand this solution? I
    > have never seen it mentioned anywhere else.


    Do you mean the line:

    width:expression(document.body.clientWidth < 550 ? "450px" : "100%" );

    I've never seen that before, but then I avoid IE-specific features.

    By analogy with other programming languages, I assume that it would set the
    width to 450px if the browser window's width is < 550 (pixels, I assume),
    but to set the width to 100% if the window's width is >= 550. Which is not
    how min-width works.
     
    C A Upsdell, Oct 10, 2004
    #4
  5. Deryck

    Deryck Guest

    "C A Upsdell" <cupsdell0311XXX@-@> wrote in message
    news:...
    >>
    >> I found this solution:
    >> http://www.antix.co.uk/code/css/imposing_minimum_width/default.htm and
    >> while the author's example does work I cannot get it to work at the
    >> resolution that I'd like it to. Does anyone understand this solution? I
    >> have never seen it mentioned anywhere else.

    >
    > Do you mean the line:
    >
    > width:expression(document.body.clientWidth < 550 ? "450px" : "100%" );
    >


    I didnt see any other in the example :)

    > I've never seen that before, but then I avoid IE-specific features.
    >

    Me too. Shame we cant avoid the whole UA!

    > By analogy with other programming languages, I assume that it would set
    > the width to 450px if the browser window's width is < 550 (pixels, I
    > assume), but to set the width to 100% if the window's width is >= 550.
    > Which is not how min-width works.
    >

    Yes, I guessed it must be something like that. I was just curious why the
    author chose 550. Is it just the desired min width +100 because 100 is a
    neat number or something else? How does that scale up or down if I want
    min-width to be 800 or 50? Who knows, the author I guess.

    Thanks for looking at the link.

    Deryck
     
    Deryck, Oct 10, 2004
    #5
    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. Paul Furman

    min-width max-width again

    Paul Furman, Feb 9, 2004, in forum: HTML
    Replies:
    10
    Views:
    731
    Beauregard T. Shagnasty
    Feb 9, 2004
  2. Lois
    Replies:
    1
    Views:
    3,415
    Ryan Stewart
    Dec 27, 2004
  3. juergen
    Replies:
    3
    Views:
    585
    opalinski from opalpaweb
    Sep 20, 2006
  4. Albert Hopkins

    When is min(a, b) != min(b, a)?

    Albert Hopkins, Jan 21, 2008, in forum: Python
    Replies:
    31
    Views:
    866
    Albert van der Horst
    Feb 4, 2008
  5. FishGills

    Retrieving width with only min-width set?

    FishGills, Oct 18, 2006, in forum: Javascript
    Replies:
    0
    Views:
    110
    FishGills
    Oct 18, 2006
Loading...

Share This Page