开发者

What is this CSS rule? [duplicate]

This question already has answers here: Detectin开发者_JAVA技巧g IE version using CSS Capability/Feature Detection (18 answers) Closed 3 months ago.

In the son of suckerfish drop down menu:

http://www.htmldog.com/articles/suckerfish/dropdowns/example/

You see this rule

w\idth: 13.9em;

This can't be a typo as it appears various times in the css. What is it for?


This is called a CSS Hack.

Some browser will ignore the \ and treat that as a width property; other browsers will ignore the entire property.

You can see a complete list here.


It's called the Modified Box Model Hack.

From the linked site:

as explained above in the section on the SBMH is hidden from IE5.x/Win because of the character escape. IE5/Mac and IE6/Win which implement the CSS box model correctly, therefore, properly get a width of 100px.


It's a "box model hack" to workaround the incorrect box model for older IE versions.

Read more about this specific hack here: http://css-discuss.incutio.com/wiki/Box_Model_Hack


It likely has to do with the box model hack. Read here for more info: http://webdesign.about.com/od/css/a/aaboxmodelhack.htm

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜