News for hackers. Stuff that matters.
Re:CSS Absolute Centering by aethr on Sunday August 11, 2013 @06:48AM (#6194648)
Just a small example, as I didn't see it mentioned in other replies.

Often when I write stylesheets for a site, I like to have a default table style. Type, possibly border/spacing, padding, etc, depending on the site. Even if there are multiple visual "types" of tables to display, typically they will all have a common set of margin/padding at the least.

If you wanted to use a table for layout in a site with default table styles, you would have to have a whole set of style resets to get it back to zero layout, before adding your custom layout stuff. This is ugly, and a pain.

One point of using a div for layout style is that it is always "zeroed", and you can assume when styling one that there's nothing that needs to be overriden.

There are no comments on this comment yet.