views:

216

answers:

2

i have an issue with my footer in IE8 only. The footer itself detaches from the rest of the page almost as if there was a line break. I used this condition statement to fix it but i got nothing

<!--[if !IE 8]>
<style type="text/css" media="screen">
#BTM {margin-top: -10px;}
<![endif]-->

How do i target IE8 only? any suggestions?

A: 

You can target IE 8 only like this:

<!--[if IE 8]>
...
<![endif]-->

or target IE 8 and above like this:

<!--[if gte IE 8]>
...
<![endif]-->

(But maybe there's a neater fix to your problem, that doesn't involve conditional comments? Perhaps you should post your HTML/CSS issue in a new question, here or on Doctype?)

RichieHindle
A: 

Remove the ! - at the moment you're targeting everything but IE8

Something like this should work:

<!--[if IE 8]>
<style type="text/css" media="screen">
#BTM {margin-top: -10px;}
<![endif]-->
Chris