Min-height|Max-height and Min-width|Max-width Fixed!
Having already known about this from the internal Y! news but not being able to blog about it until now (I totally wanted to be the first to announce this), IE7 beta2 has implemented the much anticipated css properties known as min-height, max-height, min-width, max-width. With this piece of news we can now fully rely on my old min-height fast hack trick for IE6 as it will now officially not break IE7. Whoo hoo! Today is a great day!













March 21st, 2006 at 8:18 pm
This is great news, as small height corrections are the only thing I’ve ever used CSS hacks for. It’s a relief knowing all my sites won’t suddenly break after the big 7 switch.
March 21st, 2006 at 11:32 pm
Sweetness…
Though I must say, I don’t quite get what the huge fuss is over hacks breaking in IE 7. IE 7 has fixed the star html bug, and I believe they said it will show child selectors. So it will ignore the hacks set for IE 6 and show the code set for FF, Safari, and Opera…For most of the things one would use hacks for, it looks like they’ve fixed. And for the rest, you can override with their conditional code.
Right? Or have I been missing something all this time…
March 21st, 2006 at 11:58 pm
They did indeed fix the * html hack, but only in standards mode. It will still work in quirks for IE7 - so beware you quirky junkies ;)
March 22nd, 2006 at 3:18 am
What about the !important hack? I always use that in relation with the
min-heightattribute.And dont forget easy clearing is out the window
March 22nd, 2006 at 7:18 am
That is very cool. I’ll be able to start implementing it as soon as IE7 is in non-beta and the windows update “forces” people to update it. Till then - back to the hacks ;)
March 22nd, 2006 at 7:24 am
[…] quickLink: Min-Max fixed in IE7 […]
March 22nd, 2006 at 10:44 am
yes, i´ts a great notice, but unfortunately, it does not support for :after and :before so, we will have a problem with clearing methods… :( See more in 456 bereastreet
http://www.456bereastreet.com/archive/200603/new_clearing_method_needed_for_ie7/
March 23rd, 2006 at 7:00 pm
[…] Al parecer la próxima versión de Internet Explorer tiene varios puntos a su favor, lo que indica que el equipo de desarrollo del navegador se está poniendo las pilas para entregar algo con calidad. Además han hecho muy bien al decidir que IE 7 no vendrá como componente de Windows Explorer en Windows Vista, y podrá reemplazar a la versión 6 incluso en máquinas con Windows XP. […]
June 2nd, 2006 at 8:20 am
stop pandering to their marketing bludgeon truncheon and write some proper CSS that leaves stupid IE* in the dust.
I am sick I have been researching a simple two column layout for three days now, which took one day to write originally, to try to make it work at least 1/2 as well in IE.
I refuse to produce code that is not going to be viable in three years time.
Which customer would you give filthy hack code to like the code that microsoft want you to write? I would not give IE-”compatible” CSS markup to my dog to lie on.
June 15th, 2006 at 6:23 am
Unfortunately, some of use MUST deal with IE6 and it’s bugs. I agree, the resulting code is not even fit for a dog to lie on, but the reality is that if my CSS breaks in IE6, then I am NOT doing my job.
I hate it, I don’t agree with it, and I think that it is fundamentally incorrect, but when I make these arguments to my client, they suggest going back to hacky tables to control page layout.
I am working on a huge Intranet project; even as such, there is much internal debate over standards vs. hacky code that works in IE6. I have made the argument that the standards compliant XHTML Strict 1.0 and CSS will be better for accessibility, ease maintenance, and lay a foundation for the future, including the much anticipated release of IE7. My arguments have been heard, but if I don’t make it also backwards compatible with IE6 (the ‘official’ supported browser internally) then I am out of a job.
June 21st, 2006 at 5:08 pm
And of course we have to realize that over 70% of people use Internet Explorer. Many of these people are those who turn on their computers only to type out a paper or play a game. They have no idea what browser standards are or that IE is in fact a big piecee of junk that ought to be burned… they only know that the big E on their desktop is how they connect to the Internet. So as long as we have those people around (and we will as long as IE is the default browser in Windows), we have to put up with the bugs of the evil empire. I try to always make my code work in Firefox, and to a slightly lesser extent, Opera, so as to give people more reasons to switch instead of less. I also complain (a lot) to companies that only publish code for IE only.
July 14th, 2006 at 6:33 am
Is there some example code that demonstrates how to
use the max-height hack? I’ve tried implementing both
height:auto;
and
max-height:500;
but IE6 doesn’t appear to be consistently respecting this directive. I wonder if it has something to do with the strict document type and the parsing of the HTML code? I’m confused because some pages appear to do the right thing (adding
scroll bars) and others ignore the max-height
property.
August 17th, 2006 at 5:11 am
Dustin, where’s the original article gone - I need to direct someone to it?
August 17th, 2006 at 9:38 am
Lee: Which original article?
August 18th, 2006 at 4:17 am
Hi Dustin - I meant the original explanation article - the link in the intro text at the top of the page goes back to the home page.
September 26th, 2006 at 3:15 pm
I fix it by the my own way. I’m just using fixed width ;-)
September 27th, 2006 at 8:00 am
I fix that problem by the my own way. I use fixed dimensions :-)
October 4th, 2006 at 12:11 am
Yes, I use fixed dimensions too.
November 8th, 2006 at 12:57 am
[…] Min-height|Max-height and Min-width|Max-width Fixed! @ dustindiaz.com […]
November 8th, 2006 at 2:32 am
wat if users have different resolutions?
November 25th, 2006 at 7:32 am
If user have different resolution whole site are smaller.
April 24th, 2007 at 11:34 am
I cant get this code to work with IE7.
I am trying the following:
#MasterBarContainer
{
min-width:600px;
width:auto !important;
height: 50px;
border-width:1px;
border-style: dotted;
border-color:#000;
}
#LMasterBarContainer
{
float: left;
border-width:1px;
border-style: dotted;
border-color:#000;
width:200px;
}
#RMasterBarContainer
{
float: right;
border-width:1px;
border-style: dotted;
border-color:#000;
width:200px;
}
#MMasterBarContainer
{
min-width:200px;
width:auto !important;
border-width:1px;
border-style: dotted;
border-color:#000;
}
The reason I cant specify a width for MMasterBar is because it is used to tile an image horizontally for the width of the users browser (based on resolution).