Few CSS tips
- @import delay page load. use <link> instead
- Don’t include unit for zeros.
- Avoid padding/border and fixed width.
- Use IDs for structural elements. let .net use ID’s happily!!
- Name ID/classes based on its function never for its appearance.
- Dont use short names; use full descriptive names
- HTML attributes “id” and “class” are case sensitive! so always use lower case for naming
- It is better to use reset browser stylesheet.
- Use relative font sizes
- Inline styles are only for testing.
- css style order:- a:link, a:visited, a:hover and a:active (LoVe HAte)
- Don’t use <br />; instead use <p> with margin & padding.
- Use tags appropriately like <blockquote>, <cite>, <h1>…<h6>, <strong>, <em>, etc
- Don’t use html comments inside external css because it lead to misinterpretation (child selector >)