Blog Post RSS ?

Blogs » JavaScript & CSS » min/max-width/height supported by IE7!
 

min/max-width/height supported by IE7!

by Kevin Yank

In my announcement of the second preview release of IE7 Beta 2 yesterday, I mentioned that there was little available information about what was new in this release. Well, as one might expect, those details are beginning to surface as as people try out the new build.

For me, the most exciting news so far came from Dave Shea, who reports that this latest update supports the min-width and max-width CSS properties, and presumably min-height and max-height as well!

With these properties, designers can put together page layouts that will stretch to accomodate different screen resolutions, but will also stop stretching at a certain point to preserve readability. Expect a great many new designs to begin taking full advantage of this feature, but a separate style sheet will still be necessary to apply a fixed width for IE6 and below.

This post has 32 responses so far

  1. Yes! This is freaking awesome. :)

     
  2. Finally! Yes! My dreams have come true!

     
  3. I wanted to blog about this so bad before they released it publicly…the IE team would be so proud.

    This is indeed, very great news! this now confirms that my min-height fast hack will not break.

     
  4. That’s great! I’m glad to hear Microsoft will be supporting this CSS feature.

    In the meantime, you can always use this handy minmax.js script to get around the limitations of IE (IE 5.0+ [excluding MAC]). ;-)

    http://doxdesk.com/software/js/minmax.html

     
  5. That’s definitely great news, they’re heading in the right direction now :D

     
  6. […] Ook Microsoft heeft een nieuwe versie uitgebracht, en dat is Internet Explorer 7.0-beta2. Wat nieuw lijkt te zijn vergeleken met de vorige beta is dat de CSS properties max-width, min-width, max-height en min-height nu ondersteund worden. […]

     
  7. Hooray.
    It’s a bit sad when we get so excited about something so simple. A bit like celebrating when your programming language starts supporting variables, but anyway…

     
  8. Lol… but IE6 doesnt support min height and we’ll be needing to support IE6 for years to come…

     
  9. Absolutly freakin’ brilliant…

     
  10. I am not really all that excited with the ‘IE7 will support…..’ talk - it may well do this but I still imagine IE6 and down will still hold a huge market share.

    I work in one of London’s larger universities and still know a number of people still only have IE5 :

     
  11. @timmyflash

    IE6 does support min-height, kinda. It treats height as min-height.

     
  12. I amazed by all this delight of supporting these property! the day that IE7 takes the place of IE6 is when CSS3 or something new is out and again IE is behind everyone else, again!
    don’t get me wrong. it is good to support those properties but it’s too late IMO.

     
  13. IE6 does support min-height, kinda. It treats height as min-height.

    That just means that it doesn’t support height correctly, nor does it really support min-height because if you used height for min-height (without a hack) you would break your site in other browsers.

    I’ll just be glad when the day comes that I can build a site without a single hack for IE.

     
  14. Now I’m excited… I’m happy they finally listen to developer requests (kinda).

     
  15. still does not cut it for me, and certainly doesn’t make up for the years of abuse us developers have suffered at the hands of microsoft…

    nope, firefox still buries ie7 for me, proberly still will do for a long time yet :)

    and who said i was hard to please eh…

     
  16. Livingston, please keep in mind that microsoft’s internet explorer was actually the pioneering browser to follow web standards in the first place, when there major competitor (Netscape) was not even considering to implement some sort of standard.

     
  17. Thank goodness, this is a much needed feature to bring IE in line with Firefox at least.

     
  18. Am I the only one who sees something negative in this?

    Remember all transitions from IE version X to X+1? It’s slow. Without min-max-support, at least we know where we’ve got IE. Now some will have feature on their IE, most not (in the beginning).

     
  19. This is great! But it’s true that it won’t make a huge difference right now, while IE6 is still dominant…
    Why don’t they make IE7 automatically updating? That way when IE 8 comes out, everyone will automatically get it! That would be so great! Ahhh *dreams*

     
  20. > the pioneering browser to follow web standards in the first place,

    upto a point and that was a long time ago; if i remember, m$ actually fought the standards to a degree - remember the nightmare of client side event handling huh?

    m$ lost out to that due to netscape 6 and opera 5 at that time, and they’ve been loosing ever since in my view; too late to play catch up, not that, that’s a bad thing of course…

    open source is the way to go, -BEEP- it’s the future; embrace it.

     
  21. I wouldn’t mention Opera here… ^^! (the suckiest ever browser after netscape navigator, rofl). I’d rather use IE6 (arg, already feels pain in my head, gotta headbutt a wall) that opera. Eventhough Opera provide interesting features, it still sucks. Firefox comes obviously first, but I wouldn’t say IE is so far away behind, since IE still has something interesting for newbs :)
    It can browse horribly coded websites, almost correctly when firefox and omst of others will not even care to try. Think about all the not-so-well-informed beginners ;)

     
  22. I wouldn’t mention Opera here… ^^! (the suckiest ever browser after netscape navigator, rofl).

    Ishaan, I don’t use Opera as my default browser, but criticizing it by calling it the ’suckiest’ is not exactly the most convincing of arguments.

    As for IE being ok because it can render horribly coded sites, that’s like saying cassette players are cool because they can play cassettes. If people are purposely building a page to work in IE, it’s hardly impressive for IE if it does.

     
  23. has anyone actually tested this? I’m testing in IE7 right now and min-width certainly does not work.

     
  24. […] Of course, with IE 7, that’s exactly what they’ve done (to a point), so this proprietary hodgepodge will soon be moot. But in the meantime - and for several years to come, because let’s be honest, few sites are going to cut off support for IE 6 right away - this is your solution. That is, unless it crashes your browser. […]

     
  25. Yeah.. let’s clear that.. IE7 doesn’t support min-width and min-height!
    It’s even worse - height now works as it should work and we can’t use it as min-height alias (that way was in previous ie versions) So it looks that there’s no way to get min-height in ie7.. I don’t know maybe it can be tricked using expressions :(

     
  26. sorry for misinformation in previous post.. I’ve just installed beta 3 and min-height is working! :)

     
  27. […] This whole field is so complex that I think we’ve got to consider that new paradigm of Web pages that he suggests is needed. Until we get that, I do not believe that fluid designs are robust enough to cope with all those different screen widths that may be encountered. Very long lines of text just do not work. If only Internet Explorer had supported the max-width concept in CSS, then Jakob Nielsen could have suggested flexible design within a maximum width. It appears Internet Explorer Version 7, when it comes will support max-width, so perhaps he will change his advice at that time. Now that would be much more acceptable. […]

     
  28. I don’t know what everyone is ****ing about, the question should be why we have had to wait so long for such a basic feature from the worlds most popular browser.

     
  29. You know… this junk is really starting to P**S me off.

    It has taken them ten years to rewrite code that is more complex to achieve the most simple things, and they still stink at it!

    I am not knocking IE, I am knocking the idiots who come up with these stupid HTML and CSS standards, which are hardly standard, even if followed to a T.

    When was the last time that Text was ever an issue with the shape of your page? The most major issue is with images! Their placement, their interaction and their options all stink. Not one browser handles images correctly! They may handle the image as the standard implies… but the idiots who made the standards are coders… they deal with words, not worlds! Worlds include visual representations which people call images. We don’t only use text!

    Case in point… Funny that Max-Width and Min-Width appear first to a text format, and not even considered for an image format. Do these guys live in caves? Well, I guess not, because most caves have images on the walls!

    90% of the web-pages don’t follow standards and have some form of “HACK” because the standards not only suck, but they are not standard. have you ever seen a fully compliant page… does it actually look good… on all browsers… or at all?

    CSS is neat, but it means you have to have two forms of code now… one to format the page where CSS doesn’t work, or respond like it should, and then a separate set of code for the actual CSS. That is as idiotic as keeping your cars tires in the attic, while your wheel-less car sits on blocks in your garage. Every morning you climb into your attic to get your wheels and throw them on your car before you go to work. How has that simplified web design.

    The theory was neat… Oh, well, you just change one piece of code and…. Yea, your whole website is freaked out… because you had to make all these exceptions and rules and changes just to get the old CSS to function like you wanted… and now, when they change the was CSS is handled… all your pages become messed, and you have to spend hours reprogramming, and trying to figure out which element is actually using that code… since it is separate, and there is nothing that points that code to what uses it… (But if it were inside the actual HTML being used…

    Oh wait… Some times it is… and you have to dig through hundreds of pages to find that… (Where has that saved you time, or size?)

    If you ask me… all elements should have the same available options, even if they do nothing.

    IMG Width= Absolute, or Percent, or Min-Max/L-W, or Stretch, or None.

    Here is an idea… any value that is NONE should be (CENTER) and (MIDDLE) and (TRUE VALUES)… not (LEFT sometimes, CENTER sometimes, TOP sometimes)

    Of all things to be depreciated… (CENTER) and (/CENTER) are they idiots… that is the only flawless formatting HTML that exists! It works 100% and almost every page in the world uses it… somewhere! Funny that the CSS equivalent that they expect to replace it, doesn’t work most of the time! It can’t decide if you want center on the screen size, or center of your table, or center of your paragraph margin… I have had CENTER move text on a stagnant page in three locations, just by reloading it! Great standards, morons!

    Yea, I am glad that my text won’t expand too far! Because (TABLE % wasn’t working… and it was too hard to put a blank image or div in there to keep it from shrinking too small.)

     
  30. Nevetheless, the above comment dident make much sense to the experianced css coder.

    However i agree, tables are still better at getting it done, if your a noob at css.

    Hay, its not that hard to know what is used where, just take a quick look at the class and id names, thats not so hard.

    You can even dump your oldstyle css hacks, and move on to CCs, that should solve most problems in IE.

     
  31. Jason DAngelo, your comments really don’t make sense, i thnk you should try the basics, learn how css and XHTML/HTML works then re-address your comments.

    Since i changed over to css a long time ago my life became soooo much simpler, once you grasp the basics your away (inheritence can cause issues to the newbie).

    Opera isn’t all that bad, i’ll take it over IE anytime, anyone who says IE works better than opera because it will render non standard pages better must be using a horse and cart to get to work in the morning because it never runs out of petrol, wake up to the year 2008.

    Standards are important, would you like to drive down the moterway with people choosing which direction they go in as no one set the standard of which side of the road people drive on. Yes some of the rules could be a little iffy, but that comes in all walks of life.

    About time IE pulled it’s finger out, THE worst browser ever, maybe IE8 will address this, they seem pretty convinced that it’s the way to go now.

    For all those conspirers out there, maybe the whole reason IE never supported standards (or did it badly) was to keep market share, people only coded for IE as it was the only browser being used way back when, now they have competition it would be silly to change and support standards, badly coded sites only look good in IE as it was all they where tested in, it’s their way of locking people in to IE. Same reason they didn’t want to support the open document standard in word, poeple have choice then.

    smiffy6969

     
  32. Jason DAngelo, your comments really don’t make sense, i thnk you should try the basics, learn how css and XHTML/HTML works then re-address your comments.

    Since i changed over to css a long time ago my life became soooo much simpler, once you grasp the basics your away (inheritence can cause issues to the newbie).

    Opera isn’t all that bad, i’ll take it over IE anytime, anyone who says IE works better than opera because it will render non standard pages better must be using a horse and cart to get to work in the morning because it never runs out of petrol, wake up to the year 2008.

    Standards are important, would you like to drive down the moterway with people choosing which direction they go in as no one set the standard of which side of the road people drive on. Yes some of the rules could be a little iffy, but that comes in all walks of life.

    About time IE pulled it’s finger out, THE worst browser ever, maybe IE8 will address this, they seem pretty convinced that it’s the way to go now.

    For all those conspirers out there, maybe the whole reason IE never supported standards (or did it badly) was to keep market share, people only coded for IE as it was the only browser being used way back when, now they have competition it would be silly to change and support standards, badly coded sites only look good in IE as it was all they where tested in, it’s their way of locking people in to IE. Same reason they didn’t want to support the open document standard in word, poeple have choice
    chinnappa height 6.1 as on 2008

     

Sponsored Links

Leave a response

You are not logged in, log in with your SitePoint Forum username and password.

-OR- Post Anonymously

* Make sure any code samples are escaped (i.e. ‘<b>’ becomes ‘&lt;b&gt;’).

If not logged in, your comments will be placed in a moderation queue. This means your comment may not appear until one of our moderators approves it.

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.