HTML/CSS Service

Top 10 CSS Tips

Category: CSS    |    667 views   |   

 These ten tips will get you up and running with CSS faster than you might think.

  1. The best way to learn CSS is in a free class.
    Luckily there is one offered on this site.
  2. You can use CSS on more than just span and div tags.
    Make sure that you style everything that makes sense in your document, don’t just limit yourself to span and div tags. I have seen many new CSS developers spend a lot of time trying to convert their sites to span and divs, when it’s not necessary. You can style any tag you need to.
  3. Know the difference between a style class and id.
    Classes can apply to multiple elements on the Web page, while IDs refer to only one element.
  4. Make sure that you name your classes and ids correctly.
    CSS does not allow class and id names to start with a number or other non-alphabetical character.
  5. Style the larger elements first.
    When you style a page, think about first the entire page (<html> and <body> and then the larger elements like <p> and so on.
  6. In fact, you should consider giving all your pages the style of html,body { margin: 0px; padding: 0px; border: 0px; }. Then you have a standard palette to work from.
  7. Learn how to style your body tag.
    Avoid having anything special in your <body> tag. That way you can have a more standards-compliant page.
  8. Stay out of TRouBLe.
    Memorize that mnemonic to use borders and padding effectively with your CSS styles.
  9. Do your best to understand CSS positioning before you attempt a layout.

 
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • digg
  • del.icio.us
  • Stumble it
  • Furl
  • Reddit
  • BlinkList
  • Simpy
  • YahooMyWeb
  • Spurl

Share/Save/Bookmark

1 Star2 Stars (+2)

Tags:

2 responses so far!

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word