Posted By

rumremix on 07/14/11


css list default style return values

Versions (?)

bringing back list styles in a section after they have been removed from section's parent

 / Published in: CSS

We use lists for all sorts of things, especiall navigation elements for which bullets don't make sense. Often, it is most convenient to remove bullet/list styles from all list elements globally. In fact many css resets do just that. However, there may be content areas where we do want bullets! The following css brings back the list styles for all list elements within a container with the class "bulletsAvailable". These values approximate the normal default browser behavior.

  1. .bulletsAvailable ul, .bulletsAvailable ol {margin-left: 20px;}
  2. .bulletsAvailable ul {list-style-type: circle;}
  3. .bulletsAvailable ul li, .bulletsAvailable ol li {display: list-item; float:none; }
  4. .bulletsAvailable ul li { list-style-type:disc; }
  5. .bulletsAvailable ol li { list-style-type:decimal; }

Report this snippet  

You need to login to post a comment.