tips on everything. share, find, keep.
login | register | blog | about
    

2 tips on CSS

CSS debugging

I'm sure this technique is used by many web developers, but it took me some time to figure out for myself.

When working on a specific style class it's often helpful to add a red border around it by adding the following line:

border: solid 1px red
This makes all the items which use this class very easy to notice and really helps solving the problems with the style sheets.

posted on 2006-04-14 by sasha | comment | save

tags: development, CSS, web, debug

Centering a block without using HTML <center> tag

To align a block to the center of the containing block you can set both 'margin-left' and 'margin-right' properties of the block to 'auto'.

The width of the internal block should of course be smaller than the parent's.

posted on 2006-04-14 by sasha | comment | save

tags: web, html, css