metawidget: A platypus looking pensive. (Default)
metawidget ([personal profile] metawidget) wrote in [site community profile] dw_dev_training2011-05-04 11:17 am
Entry tags:

CSS and markup conventions?

I'm tweaking some CSS for a site widget, and found myself wondering if we have any conventions dealing with the burning questions of CSS, like absolute versus relative lengths and when it's appropriate to use a table for layout purposes. Is there a guide somewhere, or should we just try to blend with nearby code and make things work any way we can?
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2011-05-04 11:30 pm (UTC)(link)
Relative lengths/widths are better than absolute; if you absolutely have to use absolute, make sure you check in all the different site skins available and at both 6pt font and at 60pt font to make sure nothing breaks. (We have people who use both extremes.)

Tables-for-layout: don't. Tables-for-tabular-data: okay, but be sure to use <th> and labels.

(Most of these are less CSS guidelines and more accessibility guidelines, actually. We don't have an official style guide for it, but we should.)