eliza81 Posted February 15, 2010 Share Posted February 15, 2010 Hi, i am sharing a tip with ypu all.Hope you find this informative:Applying multiple styles HTML elements and significance of "!important " attribute in forcing styles There can be multiple CSS classes and inline style applied to a single html element. By the default CSS rule, if same style attribute is set with different values on top of a single element, the closest attribute value will dominate in the out put at the browser end. !important is a special attribute that can break the rule, and can force a particular style irrespective of the hierarchy of all the styles applied. Link to comment Share on other sites More sharing options...
Ingolme Posted February 15, 2010 Share Posted February 15, 2010 But a good developer knows that if "!important" is in the stylesheet they most likely are misunderstanding selector priorities and there's probably a better way to do it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.