#80. Using CSS in GoLiveMuch like character, paragraph, and object styles in InDesign make it effortless to change formatting of elements across an entire document, cascading stylesheets (CSS) allow you to make sweeping changes to text formatting and other properties across an entire site. But as with element styles in InDesign, it takes a little bit of foresight and discipline to realize the flexibility and nimbleness that using CSS affords.
For the ultimately flexibility within your site, every significant element should have some way to specify it in a style. This doesn't necessarily mean you need to create a slew of classes for each type of element found in your site. It just means you should have a way to style the element via the different kinds of selectors. Heavily peppering your site with inline styles not only makes it difficult to maintain a level of consistency but also makes it next to impossible to change these styles. Here are a few pointers when using CSS to allow for the most flexibility for changes down the line and minimize the amount of additional code:
|