quick q - html that only ff and ie7 reads

Joined
12 Feb 2006
Posts
17,633
Location
Surrey
im using javscript thing that makes images on site im doing to change every 4/5 seconds and fade between the change. Works all fine in FF and hopefully IE7 as AFAIK it supports png, but not in IE6 as some annoying reason it adds a white background and because the images are at an angle and the background its on is pink/purple its very annoying and got to go. So im looking for html that only ff and IE7 read.

I forgot how to do it in css aswell so someone post the ways for FF and IE7, i know IE6 is _margin etc.
 
toastyman said:
I found a method a few weeks ago which lets older browsers read some CSS but not others...

Here's a few examples:
Code:
      div#header {margin-top:-3px;}
       body > div#header {margin-top:0;}
Code:
       .promo h3 {height:21px;}
       .promo > h3 {height:auto; min-height:21px;}
Code:
       ol {padding:0 0 0 5px;}
       html > body ol {padding:0;}

You should be able to do the things you are trying to achieve just using CSS.

was just about to post saying no as its javascript but you made me realise how, what im going to do is whatever div the javascript is in, make it so it is hidden to ie6 by adding _display: hidden;

thanks
 
robmiller said:
Use conditional comments, much nicer.

Code:
<!--[if IE 6]>
<link rel="stylesheet" href="ie6.css" type="text/css" />
<![endif]-->

i think thats worse as its harder to see the fix as you have to look at 2 stylesheets, where as my method i can see when looking at each div and the fixes right there in the one stylesheet. Just my opinion though and feel free to prove me why im wrong, which i sure the legendary robmiller can ;)
 
Back
Top Bottom