Posts tagged "css"
Tip: a lot of folks seem to think that starting a CSS class with a number is impossible. They are wrong. You can start your classes with numbers if you really want to, but you have to use a special syntax in the actual CSS. For instance:
<div class="404">No love!</div>
In the CSS you would target this div like so:
.\34 04 {
/* styling here */
}
The weirdness at the beginning of the class name is CSS syntax for an escaped UTF-8 character code. The backslash tells CSS that we’re entering into a hexadecimal character code, and the space terminates the code (and is thus discarded). Sure, it’s illegible, but at least its possible for those scenarios when you absolutely have to start your classname with a number. The CSS codes for numbers range from \30 (zero) to \39 (nine).
Allow IE to resize images much more accurately and beautifully than otherwise using a proprietary CSS property. Must-know tip when you need to specify a size in the CSS or HTML.
Plugins for high-speed markup generation. Currently in a very early state (only support for Aptana and Textmate) and mostly in Russian, but some great ideas.
Fantastic trick for centering variable-width block elements.