Enter your email address:

Delivered by FeedBurner



Use your pdf converter to make your pdf files easy! You can now buy software that makes converting pdf to doc possible! Did you know you can even convert pdf to word?
Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!

 


eXTReMe Tracker
  Web http://www.klippert.com



  Tuesday, April 04, 2006 – Permalink –

Untangled CSS

Leave spaghetti to the Bolognese


Tom Fadial has an excellent web site mostly exploring philosophy.

The seventeen year old University of Buffalo student also has a collection of tips about how to make sense of the mess that CSS can sometimes appear.

Here are five headings, be sure to go to his site to see the documentation.
  1. Indent descendant and related rules.

  2. Use shorthand properties to keep all parts of a style type on a single line.

  3. Clearly divide your stylesheet into specific sections.

    • Global Styles – (body, paragraphs, lists, etc)
    • Header
    • Page Structure
    • Headings
    • Text Styles
    • Navigation
    • Forms
    • Comments
    • Extras

  4. Define the basic rules for each area only once so that the same default value is not being rewritten in every rule. If you know that all of the h2’s will not have a margin or padding, define that on the top level and let its effect cascade as it is supposed to.

  5. The easiest method is to combine all of the tips above to move the base styles for all elements into a separate section of the stylesheet or a separate stylesheet altogether.

Tips for Organizing Your CSS





See all Topics


<Doug Klippert@ 7:49 AM

Comments: Post a Comment

Links to this post:

Create a Link