Pixels to Ems Conversion
A really great chart to determine the Pixels to Ems Conversion Table for CSS. Thank you Jon Tan. A quick over-view/sampling below.
| px font-size | em equivalent | 1px in ems |
|---|---|---|
| 11 | 0.689 | 0.091 |
| 12 | 0.750 | 0.083 |
| 14 | 0.875 | 0.071 |
| 16 | 1.000 | 0.063 |
| 18 | 1.125 | 0.056 |
| 20 | 1.250 | 0.050 |
What this chart allows you to do is determine the em width of something. Say you have something that is 770px wide, and using a font-size of 1em. You know then that the em-width of the layout is: 1 ÷ 16 × 770 = 48.125em.
- Posted on February 19th, 2008
- No Comments »
- Tags: CSS, Development, HTML, Reference
- Posted in CSS, Reference
10 best CSS hacks
The 10 best CSS hacks is a great list. Defintely worth checking out.
- Vertical align div
- Min-height
- PNG Transparency
- Autoclear
- Reset CSS (incredibly important)
- Scrolling Render IE
- Opacity
- PRE Tag
- LI Background Repeat IE
- Targeting Browsers
Good stuff.
- Posted on February 13th, 2008
- No Comments »
- Tags: CSS, Development, HTML, Reference
- Posted in CSS, HTML, Reference
Reset CSS
Eric Meyers Reset CSS has found a permanent home now. Reset CSS is a useful tool to help you default a lot of generic styles built into browsers.
” The reset styles given here are intentionally very generic. There isn’t any default color or background set for the
bodyelement, for example. I don’t particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline. Fill in your preferred colors for the page, links, and so on.”
Also be sure to check out his diagnositic css file as well.
“With a diagnostic stylesheet, you can quickly see where your markup might have some trouble. If you want to see this in action, there are two demos to check out:”
Incredibly useful tools, check them out.
Identify links with CSS and Icons.
Poolie Studios has a nice collection off icons that he uses to iconify links. This process is a fairly lightweight, unobtrusive way to show what your links are.
a[href$=".pdf"] { BLAH BLAH } is the core of the it all. This CSS selector object (easily done via jQuery for older browsers) allows you to showcase exactly what your links are.
I’m not 100% positive that this is always a good idea, but this is a nice collection of icons that fit the link sizes, and thus I’m linking it to you.