Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
conditional comments to exclude ie?
I am aware of the traditional methods of using conditional comments in the <head>
in order to offer fixes to your default.css, by placing your ie.css in a conditional after your default, you can overwrite style rules.
However, is there a way to simply hand one stylesheet to all browsers other than ie and another to ie? Hiding the default.css from ie all together?
Last edited by ma_smith (2007-03-06 09:12:33)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: conditional comments to exclude ie?
wow. take a look at this
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: conditional comments to exclude ie?
I Don’t think that it is good idea to operate with content accordingly browser name and version. Two stylesheets (one for normal browsers, and one for crapy browser ;) ) is more correct for me.
Offline
Re: conditional comments to exclude ie?
warmrobot,
depends on your perspective.
we drive cars that make our driving experience more enjoyable, full… why not browsers? Every other piece of technology does it? (consider reading Transcending CSS) – I’ve been greatly influenced by it).
:)
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: conditional comments to exclude ie?
I agreed in this case with old good “Designing with web-standards” which says that as soon as we start substitute content for different browsers, we returned to “browser wars” times.
IE6 is not forever (IE7 I hope too). So, why we need to disfigure our beautiful HTML pages in favour of one (mainly) ugly browser. Let’s make this bad browser to eat snicky CSS stylesheet and forget about it. This is my position.
I did not read this book. It has not published in Russia yet. However, I khow about Andy Clarke. His “specifity wars” post, and choosing color for web technique are so great! I had chose color for my site as Andy says. :-)
I think Roger Johansson must write a book too.
Offline
Re: conditional comments to exclude ie?
Are you serving up a whole different look to IE? IF not that seems like a whole lot of extra work.
Plus IE7 is pretty well behaved.
Shoving is the answer – pusher robot
Offline
Re: conditional comments to exclude ie?
Hmm… a afraid I misunderstood something. What you mean “whole different look”? Different from what?
Offline
Re: conditional comments to exclude ie?
>Matthew, You could use…
Downlevel-revealed Conditional Comments
The downlevel-revealed conditional comment enables you to include content in downlevel browsers. The conditional expression controls whether Internet Explorer 5 and later download and render the content. The downlevel-revealed conditional comment is the complement of the downlevel-hidden conditional comment.
The following snippet shows a typical downlevel-revealed conditional comment.
<![if !IE]>
<p>This paragraph is ignored by all versions of IE, and should display in all other "downlevel" (what MS calls other agents) browsers</p>
<![endif]>
Offline
Re: conditional comments to exclude ie?
I have taken the approach that I will write my css with standard modern browsers in mind, and I will pay NO attention to browsers that are not up to snuff.
Then… I will style my content differently, with equal viability, readability, usability, but with less finesse, and power, for those browsers which are not up to snuff.
This is not an issue of browser wars. We are moving in a common direction with standardization. We have a theme (the w3c), and so any browser which chooses to remain behind is doing so of their own accord. Anyone who chooses to use a browser like this is making a consciencious decision to use that browser or to not care about the technical life as some will not care to drive a superior vehichle.
I myself would drive a BMW if I could afford one, I cannot…but thankfully in terms of browsers I can drive the BMW of Safari or Firefox or Opera or Camino, etc etc, and I will share the advantages that option with other internet users (especially considering the “free” nature of these browsers).
That’s my take on it.
I was specifically looking for a way to offer a similar but different look to ie browsers, and did not wish to work to hack up a style sheet with selectors of stronger weight to override the default styles. This is not a site where it is imperitive for all viewers to have the same experience. Those sites exist, and I can code for those sites. This is an experiment in a different way of thinking. I am testing myself, and the theories of Andy Clarke (not that he has a monopoly on these theories), but his books was very influential in my decision :)
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: conditional comments to exclude ie?
ps. Dale,
Good call.
Here’s a post that offers a “valid” version as well. I think this may do the trick.
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#11 2007-03-06 21:24:13
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: conditional comments to exclude ie?
Sort of related – here’s what I do on my site:
<!--[if IE]><p id="firefox"><a href="http://getfirefox.com/" title="Friends don't let friends use Internet Explorer">Get A Better Browser</a></p><![endif]-->
Offline
Re: conditional comments to exclude ie?
BTW Andy Clarke’s Site does what I meant by a whole different look. You get a Mod theme for everything and a Ska theme for IE6 and under. It’s neat.
This seems to be what Matthew is after.
Shoving is the answer – pusher robot
Offline