Previous Message
Next Message

line-height IE7 versus IE8

Sent by Tim Snadden on 28 May 2010 21:09


On 29/05/2010, at 7:19 AM, Angela French wrote:

> I ended using a conditional to call IE7Hacks.css stylesheet that set  
> the line-height in it.  Is there any advantages to either method?   
> Thank you.

There are different schools of thought. I prefer to keep my main  
stylesheet valid (apart from vendor prefixes on CSS3 properties) and  
unpolluted by IE hacks. I find it helps to focus on real CSS and then  
I can go through later in the process and feed IE it's ridiculous  
counter-intuitive hacks in an isolated and heavily commented separate  
file. That way I don't need to worry about using invalid stuff like  
zoom: 1 for IE.

Others prefer to keep things in the main stylesheet. The advantage of  
this is that is reduces HTTP requests (better performance) and keeps  
the CSS rules for an element in the same location. One compromise is  
to use conditional comments to add a class name to <body> and then use:

#my-element {
	...
}

..ie #my-element {
....
}

..ie7 #my-element {
....
}

..ie6 #my-element {
....
}

cheers, Tim


______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: