demosthenes.info

A blog by Dudley Storey on , , , , , , and anything else that strikes his fancy.

featured articles

popular favourites

General rules for creating CSS

  • Try to avoid inline and embedded styles as much as possible.
  • Write your HTML first, then link to a style sheet. Trying to do both at the same time almost always results in confusing and messy code.
  • Create style rules for the “biggest” tags first: body (and, if necessary, html).
  • Try to create your style rules in the same order as the elements appear in the page: that is, body first, followed by h1, h2, etc.
  • Create rules that are true for the majority of content influenced by a particular element, such as p, then create rules for exceptions.

web developer guide

featured comment

by JoelB in Goodbye, JQuery Validation: HTML5 Form Errors With CSS3

what i'm reading

A Storm of Swords: A Song of Ice and Fire: Book Three
A Storm of Swords: A Song of Ice and Fire: Book Three

what i'm watching

Californication: The Third Season
Californication: The Third Season

what i'm playing

Mass Effect 3 Collector's Edition
Mass Effect 3 Collector's Edition

what i'm hearing

Dub FX
Dub FX

blogs

podcasts

no ads ever

This blog is free of advertising, and always will be.

creative commons licensed

The content of this blog is free to use in whatever way you wish under the Creative Commons license.