tags:

views:

37

answers:

2
#content { padding-top: 13px; *padding-top: 0; }

View Source

My Question is, what does the * do in this example?

It's from the source code on apple.com/uk website

+1  A: 

It's a hack to serve IE, which improperly parses it, padding-top of 0.

meder
thank you for your response
smoop
+1  A: 

My Question is, what does the * do in this example?

It is a CSS hack used to target IE6 and IE7.

#content {
    padding-top: 13px; /* for standard-compliant browsers */
    *padding-top: 0; /* for IE6 and IE7 */
}

Note: It is bad idea to go for CSS hacks. The better approach to target IE is to use IE conditional comments.

Sarfraz
SO rather than using *html id{padding-top:0;} or *paddding etc use <!--[if IE 6]> the css<![endif]-->
smoop