IE 5 css hacks

On 2-18-2005, in Coding, CSS, by Alex

/* IE 5.5 can’t see the next line but all others can \*/
#column2 { margin-top: 10px;}
/* End hack – BTW it works for Mac IE too */

div#id {
position: static; [1]
position/* */:/**/:relative; [2]
position:relative; [3]
}

Line [1] is read by all browsers – final value for IE5.0
Line [2] is ignored by IE5.0 and IE5.5 but read by all other browsers
Line [3] is also ignored by IE5.0 but is read by IE5.5 – final value for IE5.5

And Conditional Comments:

<!–[if IE]>
According to the conditional comment this is Internet Explorer
< ![endif]–>
<!–[if IE 5]>
According to the conditional comment this is Internet Explorer 5
< ![endif]–>
<!–[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0
< ![endif]–>
<!–[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5
< ![endif]–>
<!–[if IE 6]>
According to the conditional comment this is Internet Explorer 6
< ![endif]–>


<!–[if lte IE 5.5]>
According to the conditional comment this is Internet Explorer lower or equal to 5.5
< ![endif]–>

 

One Response to IE 5 css hacks

  1. [...] ansparent {background: transparent url(/semi.png) repeat 0 0;} /* FOR IE <7 (added via Conditional Comments to get CSS valid) : */ .semitransparent {background: none; filter:progid:DXImageTransform.Micros [...]

Leave a Reply