A Couple of Links and Random Thoughts, Dropped on You Out of the Blue
I haven't shared random bits of Internet with you for months. That changes right now.
I haven't shared random bits of Internet with you for months. That changes right now.
Lost in the past few years of IE6 based stagnation (and ensuing developer angst) is the fact that the Internet Explorer team have come up with some pretty cool enhancements to the way we build web sites over the past ten plus years.
So, while we're cheering on Firefox's growing market share, hesitantly eying IE8 and waiting for the ugly stepchild of the browser landscape, IE6, to finally die a painful (and hopefully immediate) death, I thought I'd lay out some of the innovations introduced by Internet Explorer to remind us of relatively positive days gone by*.
As a fun exercise, while you're reading this, compare these innovations to the black hole left in the web development world by the long and terrible reign of IE6. It's an interesting juxtaposition of help vs. harm. Here's hoping future versions of the browser continue to trend closer to the "help" line as IE7 has and IE8 appears to be doing**
(more…)
Here's it is.
//height for IE6. Thankfully IE6 messes up height in a useful way
height:350px;
//height for everything else. IE6 looks at this and says "wha?"
height:auto;
//min-height for everything else. IE6 is baffled by this.
min-height:350px;
Dave Shea says:
"Did you know that you can nest your divs so deep that Firebug stops working properly? I do now."
From:
Personally, I'm surprised because I've seen some savagely nested divs produced by systems like Drupal and while it was a singularly awful environment to work in, it didn't actually cause Firebug to choke. Also, looking through his code, I see nothing that screams to me as being exceptionally deeply nested. I put a comment in. I'll update with more info…
Answer: When it's a unique identifier.
Check out this class attribute generate by my beloved Wordpress' upload feature:
class="alignleft size-medium wp-image-4590"
See anything suspicious? I sure do. wp-image-4590 is a unique identifier being passed off as a class. Why? I actually have no clue as I'm not privy to the thought process behind that particular piece of code
What I do know is pretty much demands to be an ID. When I teach this stuff to people, I say "If it's unique, meaning there will ever only be one of them, make it an ID. If there's more than one or it's a general descriptor, make it a class." So I look at that code block every time I upload an image and I frown. Then I blow away the whole class attribute away, since I use none of them.
This is just splitting hairs, I know. Using a class like that is basically harmless. But, truth be told, splitting hairs helps me solidify my ideas about the way these things should work. That, in turn helps me improve the way my crew and I do our thing. So? Hairs I split and everyone is happier.
I'm just doing my small part to make the web a better place one nitpicky, semantic post at a time.