Ramblings

Archive for the ‘css’ Category

29 Aug, 2008

CSS tooltips using CSS Sprites

Posted by: Matt Williams In: Uncategorized| css| gotchas| web design

For a project I’m currently working on I wanted to make some “bubble” tooltips.  In order to cut down on the size/number of images, I’m using css sprites.  A quick google reveals that nobody else has (at least on the first page) put together tooltips using sprites.  The technique will work with any sort of [...]

28 Aug, 2008

CSS “width” gotcha

Posted by: Matt Williams In: css| gotchas| web| web design

I found out something interesting today.  Per the W3C, the total “width” that a block element uses is:
If ‘left’ or ‘right’ are given as ‘auto’, their computed value is 0. The following constraints must hold between the other properties:
‘margin-left’ + ‘border-left-width’ + ‘padding-left’ + ‘width’ + ‘padding-right’ + ‘border-right-width’ + ‘margin-right’ = width of containing [...]

Tags: ,

Categories

DrakNet Web Hosting