Which CSS hack can pass the w3c validation?
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:
- Easy selectors
- Minimized attribute selectors
- !important
- @import "non-ie.css" all;
- 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.
精彩评论