开发者

Which CSS hack can pass the w3c validation?

开发者 https://www.devze.com 2022-12-21 05:21 出处:网络
Which css hacks we use to make layout cross browser compatible Can pass W3C validation Will work forever

Which css hacks we use to make layout cross browser compatible

  • Can pass W3C validation
  • Will work forever
  • Will never create in any future browser versions

What are alternatives which can pass the w3c validation for popular CSS hack which are not valid?

for example

underscore hack, zoom:1 etc.

my purpose is to make a list of W3C validated and non problematic CSS hacks and techniques which can be helpful to make CSS layouts cross browser compatible.

mainly we use CSS hacks for IE , but sometime we need Hacks for other desktop browsers also.

Main Concerned browsers are:

  • IE6, IE7, IE8
  • Safari latest final release
  • Firefox 3.6,开发者_运维百科 3.5 , 3.0 and 2.0
  • Opera Latest final release
  • Google Chrome latest


Here is the list:

  1. Easy selectors
  2. Minimized attribute selectors
  3. !important
  4. @import "non-ie.css" all;
  5. body[class|="page-body"]

They are listed here: In-CSS Hacks.

However, nobody promise they will work forever.

The best approch for IE hacks is to use conditional comments.

0

精彩评论

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

关注公众号