Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What CSS hacks are these?

Tags:

css

css-hack

I found this in a CSS declaration code I am now partially responsible for:

margin: 0 0 0 10px;
*+margin: 4px 0 0 10px;
margin: 3px 0 0 10px\0/;

... the *+ and \0/ are what I'm looking at in particular. What are the hacks being employed here?

And is there a standard place I can look at to look at current and past CSS hacks that also lists their applicability and usefulness? I want to be able at a glance to see a difference between an on-purpose hack and simple code errors.

like image 320
artlung Avatar asked May 02 '11 17:05

artlung


2 Answers

margin: 3px 0 0 10px\0/;

That one is a CSS hack to specify Internet Explorer 8.

*+margin: 4px 0 0 10px;

This one is for Internet Explorer 7

like image 55
Avisra Avatar answered Sep 20 '22 05:09

Avisra


As for a list of hacks, this is pretty comprehensive, but I'm sure theres more hacks out there.

like image 39
musaul Avatar answered Sep 24 '22 05:09

musaul