1. How do speed up web pages? CSS & HTML tricks - Swati Arora
2.
3. CSS font shorthand rule When styling fonts with CSS you may be doing this: font-size: 1em; line-height: 1.5em; font-weight: bold; font-style: italic; font-varient: small-caps; font-family: verdana,serif font: 1em/1.5em bold italic small-caps verdana,serif NOTE: This CSS shorthand version will only work if you're specifying both the font-size and the font-family else the font-weight, font-style, or font-varient then these values will automatically default to a value of normal.
4. Two classes together <p class="text pad">...</p> Using these two classes together (separated by a space, not with a comma) means that the paragraph calls up the rules assigned to both text and pad. If any rules overlap between the two classes then the class which is below the other in the CSS document will take precedence.
5. CSS Sprites BELOW #nav li a {background:none no-repeat left center} #nav li a.item1 {background-image:url('../img/image1.gif')} #nav li a:hover.item1 {background-image:url('../img/image1_over.gif')} #nav li a.item2 {background-image:url('../img/image2.gif')} #nav li a:hover.item2 {background-image:url('../img/image2_over.gif')} AFTER #nav li a {background-image:url('../img/image_nav.gif')} #nav li a.item1 {background-position:0px 0px} #nav li a:hover.item1 {background-position:0px -72px} #nav li a.item2 {background-position:0px -143px;} #nav li a:hover.item2 {background-position:0px -215px;}
7. !important ignored by IE Normally in CSS whichever rule is specified last takes precedence. However if you use !important after a command then this CSS command will take precedence regardless of what appears after it. This is true for all browsers except IE. An example of this would be: margin-top: 3.5em !important; margin-top: 2em So, the top margin will be set to 3.5em for all browsers except IE, which will have a top margin of 2em. This can sometimes come in useful, especially when using relative margins (such as in this example) as these can display slightly differently between IE and other browsers.
8.
9. Text Wrapping .truncate { width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } A long cold winter delayed the blossoming of the millions of cherry...