CSS min-width property in IE?

D

Deryck

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
 
C

C A Upsdell

Deryck said:
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.
 
D

Deryck

C A Upsdell said:
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
 
C

C A Upsdell

Deryck said:
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.
 
D

Deryck

C A Upsdell said:
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
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top