Shaun Mccran

My digital playground

13
N
O
V
2009

Altering bullet point styling using css

I've been writing an error handler that uses JQuery to output a list of errors on a validation event. The error display uses a html list display, and the default display style is a bullet list. This is a simple css script to change the bullet style to something else. In this case nothing!

view plain print about
1<style>
2 ul.list-cleaned {
3 margin: 0;
4 padding: 0;
5 }
6 ul.list-cleaned li {
7 margin: 0;
8 padding: 2px 0 2px 16px;
9 list-style: none;}
10</style>
11
12<ul class="list-cleaned">
13    <li>First list item</li>
14    <li>Second list item</li>
15    <li>Third list item</li>
16</ul>

Output:

  • First list item
  • Second list item
  • Third list item

I think it looks a bit cleaner than bullet points.

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Back to top