Feed IE 6 with a basic stylesheet

Making compromises for Internet Explorer 6 with or without Conditional Comments in most situations is fine when it comes to a handful of rounded corners and some transparent PNGs. The user will get a site design that looks pretty much as intended, however, it will be a watered down version of the beauty intended (Andy Clarke has put together a great list) of acceptable differences.

Whilst we can target IE 6 with Conditional Comments, this approach requires the main CSS to be over-ridden with different values, but what if we do want to start from scratch with IE 6?

Recently discussed at Rissington HQ it was decided for some sites, we didn't want to really support IE 6 and with some people making a concerted effort to ditch IE 6 support, we would still like IE 6 users to see "something" but not a mess either. Instead of supplying the fancy-dan CSS, it would be ideal to just supply a basic text version, such as the basic style we already apply to IE 5, Netscape etc.

We have been able to hide styles from older browsers such as IE 4 and Netscape using the @import declaration (and IE 5 using the filter /**/), but this won't work for IE6 and above. Digging around in the Textmate HTML bundle, I accidentally stumbled upon a Conditional Comment basically saying, "if you're not IE, show this"... Ah ha!

So very quickly here's the score. At the moment we can link to our external CSS using this code and as IE 5 can't understand the @import bit, it just gives up:


<link rel="stylesheet" href="textonly.css" type="text/css" media="screen" />
<style type="text/css">@import/**/"my_gorgeous_layout.css";</style>

Using the [if !IE] Conditional Comment however, we can just feed old Microsoft browsers one style and more modern browsers another. Like this:


<!--[if !IE]><!-->
<link rel="stylesheet" href="my_gorgeous_layout.css" type="text/css" media="screen" />
<!-- <![endif]-->

<!--[if gte IE 7]>
<link rel="stylesheet" href="my_gorgeous_layout.css" type="text/css" media="screen" />
<![endif]-->

<!--[if lte IE 6]>
<link rel="stylesheet" href="textonly.css" type="text/css" media="screen" />
<![endif]-->

I've tested the basics of this approach and it works well. If anyone tries has some success on a future or current site, please let me know.

Comments (20) | Permalink for this entry

Some new work in the portfolio

I’m breaking back into the news pages to highlight a new piece of work I did for Denna Jones. The same Denna Jones, whose site by Jon Tan (thanks Jon, by the way) and Jon Gibbins should be an inspiration to all.

It all went well and we’re all pleased with the result. And I got to use some Trade Gothic.

| Permalink for this entry

Constant state of change

This section of my site is taking a back seat. It’s going to stay alive, but just away from public view for now and be experimented with…

| Permalink for this entry

Where is the Campagnolo style in 2009?

Record Delta brakes

Campagnolo Record Delta brakes - circa 1988* Photo: Leigh West

I'm sure the new 2009 top end kit works like a dream, but lets face it, cycling is as much about aesthetics as anything. And if there is one component manufacturer that sums up this up more than any other, it's the Italian firm Campagnolo. Or, I think, used to sum this up.

This week, Cycling Weekly have confirmed all the spy shots and rumours about an overhaul of the 2009 Campag offerings and re-introduction of Super-Record. 11 speed cassettes are one thing, but it's the new ergo levers and rear-mech that concern me. Carbon fibre has taken over the whole show, and although it can look good in moderation, there are no clean crisp lines to be seen. Functional? Probably. Aerodynamic? Doesn't look like it. Good looking? Er, no thanks love.

Pick up any cycling magazine in the past couple of years and you'll notice an amazing amount of retro articles abounding - harking back to a golden age (the 80's, bizarrely) where bike technology leapt forward with style, the racing was exciting and EPO just a sponsors dream. But look at the bikes - and look at the kit that Campagnolo were producing - it's was so stylish. Yes, I wanted some of it, and I couldn't afford it. Not on my Sunday job wages.

I never want to go back, I just want some style injected into modern cycle components, not just carbon. Still, the new Shimano Dura-Ace looks quite nice...

*Issue 5 of Rouleur magazine has an excellent article on Campy Record Delta Brakes

| Permalink for this entry

One lost shoe

Can you see what it is yet?

Building upon the spook shoe collection, it has been suggested many times that this should be a public Flickr group.

And now it is. And anyone can join if you have a relevant entry that abides by the rules:

  • Shoe must genuinely be lost
  • Other shoe must be nowhere to be seen
  • Location must be accurately located on the map so an accurate picture can be built up

One lost shoe

| Permalink for this entry

Archives

French Disko:

French Disko: Before de.licio.us

A breif message

This looks like one to subscribe to.

4 Sep 2007 10:23

Keyboard washing

Lovely little film…

22 Aug 2007 13:07

Thoughtful

I like this approach. Thanks Steve.

21 Aug 2007 12:05

43 Folders on Mail

Smart Mailboxes are one of those features never used out of the box. I’ve had point 2 set up for a while now - do it and you’ll never look back.

17 Aug 2007 12:11

Fast Friday

Fixed is now at the top of the cool curve.

14 Aug 2007 15:59

Lee Hazlewood

A proper genius.

6 Aug 2007 12:22

I can't find it:



RSS feeds:

Subscribe to this site with my RSS feeds to stay up to date with news, additions and oddities.

Something more surreal: