Posted by: webkori on: January 21, 2009
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-variant: small-caps;
font-family: verdana,serif;
There’s no need though as you can use this CSS shorthand property:
font: 1em/1.5em bold italic small-caps verdana,serif
Much better! Just a couple of words of warning: This CSS shorthand version will only work if you’re specifying both the [...]
Posted by: webkori on: July 17, 2008
With the imminent launch of IE7 your usual CSS hacking methods are going to fail. If you want to save web design, as we know it, it’s time to take some drastic action.
CSS has experienced a colourful and unusual history. From historic slow adoption to the current slow rate of development, ugly hacks have meant [...]
Posted by: webkori on: April 23, 2008
CSS: Specificity Wars
Join me, and together we can rule the galaxy as father and geeks!
A few weeks back in Cupertino, I saw Aaron explain how the specificity of CSS selectors is calculated in a way which I hadn’t seen before. Then today I came across a knotty problem while building XHTML and CSS templates for [...]
Posted by: webkori on: March 25, 2008
Why does the CSS box model need a hack?
According to the W3C, an assigned ‘width’ (and ‘height’) of a box refers to the ‘content area’ of a box only. The padding, borders, and margins are then added to this value to arrive at the total box width. If the ‘width’ property is omitted, the total [...]
Recent Comments