So I've used it successfully in FireFox, but it doesn't appear to work in IE???
Is there any way to accomplish something similar?
min-width in IE
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
That was fast 
Hmmmmm...but if I use width, then it doesn't take the whole screen...which it should
It's a toolbar...at the top of screen which consumes entire space...but the screen is a box fixed at 760px, but centered in screen. The toobar must fill the screen, but when the window is resized below 760px, the toolbar should stop shrinking, as the content is right justified, it keeps moving to the left even after it should have stopped...because the body (760px) has been passed and horizontal scroll bars have appeared...
Follow me?
Hmmmmm...but if I use width, then it doesn't take the whole screen...which it should
It's a toolbar...at the top of screen which consumes entire space...but the screen is a box fixed at 760px, but centered in screen. The toobar must fill the screen, but when the window is resized below 760px, the toolbar should stop shrinking, as the content is right justified, it keeps moving to the left even after it should have stopped...because the body (760px) has been passed and horizontal scroll bars have appeared...
Follow me?
actually ie treats height as min-height. it strange occasions it does treat width as min-width.
ie does allow for expressions in css. you should try this
the underscore ('_') before the attribute will only be recognized by ie (not ie7 which supports min-width), and then will do an expression on it.
the expressions does this: if this element width is less that 779px, then set its width to 779px, else set it to 100%.
you can use this functionality to make ie act like it has min-width.
ie does allow for expressions in css. you should try this
Code: Select all
#element
{
_width: expression((document.documentElement.offsetWidth < 779) ? '779px' : '100%');
}the expressions does this: if this element width is less that 779px, then set its width to 779px, else set it to 100%.
you can use this functionality to make ie act like it has min-width.