Dojo Dijit and HTML5 in Real world applications/CSS/117 reasons why CSS dont work

From PMISwiki
< Dojo Dijit and HTML5 in Real world applications
Revision as of 23:32, 1 March 2012 by Psa (talk | contribs) (Created page with "__NOTOC__ The is so many possible errors when working with CSS. In this article I have collected some of the most common mistakes. ==To general declaration== A CSS declaration,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The is so many possible errors when working with CSS. In this article I have collected some of the most common mistakes.


To general declaration

A CSS declaration, that defines behaviour on top level elements may destroy detailed declarations.

detailed.img {
        Padding: 0px;
}

fieldset, img {
	border: 1px solid;
	margin: 5px;
	Padding: 10px;
}

This happen if the declaration is placed after detailed declarations.

The order of CSS file declarations are wrong

The last file declared in the header takes preference, and overwrite declarations carried out in files declared earlier.

Don't use the title when declaring a CSS file in the Header

<link rel="stylesheet" href="css/style.css" name= media="screen">

Verified in

IE 8, Firefox 3.6.22, Dojo 1.6.1

References

Document History

Version Date Author Status Purpose of update
1 14 Feb 2012 PSA Draft Not released.