Recently in CSS Category
May 20, 2008
Resizing div with font size
I was working on a complicated layout where I was trying to center a div. For some reason, the usual auto margins technique would not work because the div always expanded to the full width of its container even though the width was not set to 100%.
The only way I could get the div to center was to use auto left and right margins in conjunction with setting a width. However, I wanted the layout to scale gracefully if the font size was changed. The solution was to specify the width in em. This makes the div resize with the font. Quick and dirty, but it works well enough until I have time to come back to take a closer look at the problem again.
February 14, 2008
Sad, funny and true web dev story
I asked a MySpace developer why a few particular links on their site were javascript onclick events applied to a span tag, rather than anchor tags.
He said it was because the product specifications required those links not to be underlined.
*headdesk*
This explains a lot.