Thursday, October 4, 2012

CSS Tips

Heres' a great article sharing some useful tips about using CSS, " 20 Useful CSS Tips for Beginners." Since I'm a beginner, I found them very helpful. It shares some basic tips like knowing the difference between a class and id, using divs instead of tables, etc. It shares ways to keep you CSS style sheet from getting too cluttered and confusing, such as using shorthand CSS:

Instead of doing this:

background-color: #FFF;
background-image: url (image.gif);
backround-repeat: no-repeat;

Do this:

background: #FFF url (image.gif) no-repeat;

The article also mentions some new things that I hadn't heard before. I learned that you can use the code, !important, to make sure something follows that particular style, even if there is another style that would usually override it. It also shares the codding to replace text with images, commonly used in headings, and some free CSS Editing Applications:
Simple CSS
Notepad++
A Style CSS Editor

No comments:

Post a Comment