Friday, October 1, 2010

CSS Hacks

Dealing with browser inconsistencies often makes up a majority of the work for a web designer. by means of CSS Hacks we can make browser compatible websites . For every HTML/ CSS Developer hacks are link a god spoon in their Hand. By this Developer can make copatible websites for IE6 (which is like a stuck bone in neck of Developer). so read this and enjoy Hacks

These hacks are not validated by W3C CSS Validater and they show a error, But this is not a issue for SEO purpose , as Google only crawl HTML Content.

So Use Hackssss....................

Some hacks Are...
@import "stylesheet.css" all; imports the stylesheet in all major browsers except IE 7 and below. It may or may not work in future versions of IE.

_property: value and -property: value

he CSS specification allows browsers to use an underscore (_) or hyphen (-) as a prefix for a vendor-specific property name with the guarantee that such properties will never be used in a future CSS standard. Because of this guarantee, these two prefix characters are ideal options for this hack.

Although the CSS specification defines this vendor-specific property syntax, the properties are inherently not part of any W3C-endorsed CSS profile and are therefore invalid when validated against one. For this reason, and because there is an often acceptable alternative, this hack is unrecommended.

_property: value and -property: value apply the property value in IE 6 and below. Warning: this uses invalid CSS.

*property: value

Although Internet Explorer 7 corrected its behavior when a property name is prefixed with an underscore or a hyphen, other non-alphanumeric character prefixes are treated as they were in IE6. Therefore, if you add a non-alphanumeric character such as an asterisk (*) immediately before a property name, the property will be applied in IE and not in other browsers. Unlike with the hyphen and underscore method, the CSS specification makes no reservations for the asterisk as a prefix, so use of this hack could result in unexpected behavior as the CSS specifications evolve.

*property: value applies the property value in IE 7 and below. It may or may not work in future versions. Warning: this uses invalid CSS.




No comments:

Post a Comment