开发者

Apple UK website CSS, *padding-top:0; What does this mean?

开发者 https://www.devze.com 2023-01-21 18:20 出处:网络
#content { padding-top: 13px; *padding-top: 0; } View Source My Question is, what 开发者_开发问答does the * do in this example?
#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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消