Conditional Classnames

Paul Hammond has a very clever idea about avoiding conditional sytlesheets for Internet Explorer. Basically, if we just use conditional comments for IE to include a classname in the body tag, we can isolate the specific IE rules in the main stylesheet.

Pros

  • Avoids any extra HTTP requests for files with IE-only hacks
  • Slicker than including that monstrosity inside the head tag
  • Allows for easier reading and maintenance of stylesheets. The IE hacks can be placed where they’re relevant in the stylesheet.

Cons

  • Doesn’t this defeat the entire idea of separating out hacks from standard CSS?

Does anyone else have opinions on the matter?

CSS Internet Explorer Bugs

The other day I ran in to a bug in IE 6 that I had never encountered before. I had a left-floated content box with a margin of 105px on the left. Everything worked fine in the good browsers as usual, but when I checked IE 6, I noticed that the margin was off. No real surprise there. Upon further inspection, I noticed that the margin was more than just off, it was exactly double the actual margin.

After doing some research, I discovered that the bug has been well documented as the “Doubled Float-Margin Bug.” Position Is Everything has a good explanation:

This bug only occurs when the float margin goes in the same direction as the float and is trapped directly between the float and the inside edge of the container box. Any following floats with a similar margin won’t show the doubled margin. Only the first float in any given float row will suffer from the bug. Also, the doubled margin displays symmetry, working the same way to the right as it does to the left.

As it turns out, I didn’t even need to use their recommended fix for the bug. I was able to ax it by just adjusting which elements had the float and margins.

Position Is Everything also contains an entire section IE only bugs. I know this is going to be an invaluable reference for me when I’m trying to track down odd behavior that I’m sure is a bug and need an easy fix.

Browser Testing Sequence

Here is an interesting post on what one web developer does to test a site in all of the relevant browsers.

I think that it’s a good general description of what browsers you should test and things to be looking at in each test.

For instance, some of the older browsers (like IE 5.5 and IE 5) aren’t worth your time to make the site look perfect in them. It is however probably advisable to at least make sure your site is still readable and useable in them (even if that means stripping out the JavaScript and CSS).

Generally speaking, this is about the same process that I follow. I’m not nearly as vigilant with all of the smaller browsers though:

When something major (a full page template or a particularly tricky part of a design) is done I give it a quick check in the latest version of every browser that runs natively on Mac OS X. Currently that means Camino, Flock, iCab, Netscape, OmniWeb, Opera, SeaMonkey, Shiira, WebKit Nightly, and any other newcomers.

Excited About Vista?

The other night my mother was asking me if I was excited about Vista coming out. She wanted to know if I planned on upgrading soon. When she asked what I thought about it, the first thought that came to mind was, “Who cares?”

The reality is Vista doesn’t bring anything to the table that I haven’t already been using for quite some time. Even though I don’t own one, I spend most of my time on a Mac. I manage an all Mac computer lab for work, we don’t even get to touch PCs. I keep a PC at home for two reasons: to play games and to keep my PC skills up to snuff. Tiger has all of the features that Vista is bringing, and more. This article from Mac User does a good job of highlighting that:

The idea of upgrading a Windows machine gives me a case of cold sweats. It’s just no fun. And in Vistas case, everything I’ve read so far points to the fact that users should be prepared for having to do a lot of tinkering. Most drivers are not yet released, and many that are are still in beta. Apple just announced that iTunes users should wait to upgrade until the next major iTunes update.

I’m not excited about the user interface changes in Vista. To give credit where due, I’ve heard a lot of good things about the changes (I have yet to touch Vista). The problem is, I don’t want to have to “learn” another OS. I’ve spent enough time with Internet Explorer 7 to decide that I hate the new no tool bar. It didn’t bother me so much until I installed a developer extension (made by Microsoft) and then spent about 15 minutes figuring out how to display the thing.

The other breaking point for me is the cost. Vista is really expensive. I know that Apple seems to update their OS just about every year, but at least the $129 price tag is reasonable and they give you features to be excited about. I don’t think that any of the lower end versions of Vista are going to be what I’ll want, so I’ll probably end up with something more expensive. Right now my employer offers $5 copies of Windows XP Pro for ‘working at home.’ I hope they’ll work a similar deal for Vista eventually.

The way that I see it, the only thing that Vista really offers is Direct X 10. Unfortunately, much of the hardware doesn’t support it yet. More importantly, we’re at least year away from seeing some games that make decent use of it.

Don’t mistake me, I will upgrade to Vista eventually. My career in computer support requires it. And, as soon the Direct X 10 games start coming out, I won’t have a choice. But right now, I’m staying put with XP. It’s proven to be ‘okay.’ At least we know it’s demons well and how to fight them.



appointive
appointive
appointive
appointive