Updated:
Welcome to my liquid-layout page of CSS happiness! This site is intended to be a reference of all the tips and tricks I find while learning web design. What is CSS? Well, think of HTML as the structure and content of a web page and the CSS as the way to style it. Want two columns? Use CSS to arrange your HTML. Want blue font in your third paragraph? Use CSS to describe how you want the third paragraph to look. View this page's CSS.
Color scheme I'd like to use:
(1) #ED5A79, (2) #E8B36D, (3) #73B769, (4) #FFCB18, (5) #28A3C2 and text as (6) #385A6B
TopStuff found in the CSS:
Websites I like:
Vertical Navigation:
Pay close attention to the area of the button that is clickable in IE. This implements the *html hack to keep IE6 and earlier behaving. Under normal circumstances only the text in the button is a link, but with the *html hack the whole colored bar in IE6 is a link. The hack in question is: * html a { height: 1px; }. According to CSS: The Missing Manual, "The style declaration itself is nonsense: It attempts to set the height of the link to 1 pixel, something that IE ignores, but which forces that browser to see the background of the button as part of the link." Word, yo.
Top16 Standard Windows Color Names:
Black, White, Red, Green, Blue, Yellow, Magenta, Cyan, Purple, Gray, Lime, Maroon, Navy, Olive, Silver, Teal.
TopPop-Up Photo Gallery:
A photo gallery is one use for this incredibly professional looking yet very easy bit of CSS code. All images are loaded when the page loads so images pop instantly when rolled over - no waiting and no JavaScript!
The pop-up effect can be used with text, too! For example:
The JavaScript included on this page is at the very top showing when this page has been last modified. It's magic! The rest of my examples will be on their own JavaScript page to keep it all in one place and to keep this page from getting too busy.
TopPlaying with the Font:
Font Variants: "Small caps" -> Small caps.
Text Transform: "Uppercase" -> Uppercase;
"LOWERcase" -> LOWERcase;
"capitalize" -> capitalize.
Look, Ma! I blink! (Not functioning in IE6. Originally the whole word blinked, but it got too annoying, so now it's just the exclamation mark...)
Acronyms and abbreviations (and a helper box!)
This CSS is an acronym
This...
This is an ABBR. (Not functioning in IE6)
Tables and Specificity Points in one!
Here's a table showing CSS specificity points:
| Selector | id | class | tag | total |
|---|---|---|---|---|
| p | 0 | 0 | 1 | 1 |
| .byline | 0 | 1 | 0 | 10 |
| p.byline | 0 | 1 | 1 | 11 |
| #banner | 1 | 0 | 0 | 100 |
| #banner p | 1 | 0 | 0 | 101 |
| #banner .byline | 1 | 1 | 0 | 110 |
| a:link | 0 | 1 | 1 | 11 |
| p:first-line | 0 | 0 | 2 | 2 |
| h2 strong | 0 | 0 | 2 | 2 |
| #wrapper #content .byline a:hover | 2 | 2 | 1 | 221 |
This is an example of a table with "preserved" spaces:
Day: Column1 Column2 Column3 Column 4
Monday x x
Wed x x x
Friday x
Top
Questions and comments: