CHAPTER 16 CHANGING THE LOOK OF (Web hosting top) YOUR
CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 457 ul#contribute { list-style-type: none; margin:0; padding-left: 10px; } ul#contribute li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } ul.recentcomments { list-style-type: none; margin:0; padding-left: 10px; } ul.recentcomments li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Listing 16-16 shows an improved version with a new class name, rightsidelists, which is a little more semantic and can be applied to all three sections. Listing 16-16. The Reduced Multiple Class CSS Rules Added to style.css ul.rightsidelists { list-style-type: none; margin:0; padding-left: 10px; } ul.rightsidelists li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Using the reduced CSS rules in Listing 16-16 means applying a class attribute matching the class name to each unordered list in the right column, as in
- . This is fine for a couple of lists, but gets a little repetitive and is tedious to remember. A better solution is to use the combination of a unique identifier and an element selector, instead of a class selector, to apply rules to all unordered lists in the right column. This eliminates the need to remember to use the class for each one. Listing 16-17 shows the CSS rules that will apply to all unordered lists in the right column.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.