Customizing Indentation for Bullets

20 May 2010 by shealeen, No Comments »

Here is an example of a default HTML list with no CSS styling:

  • This is what I consider an ugly HTML list.
  • Almost every website incorporates lists. We love to make lists because it chunks data into separate, easy-to-read pieces.
  • There are several problems with the default style of HTML lists: they have bad spacing and browsers do not play nice with custom bullet images.
    • Spacing Issues:
      1. There is no distinct spacing between list items, which is annoying when reading list items that contain multiple lines.
      2. The initial left indent. Do we really need all that white space in the left margin, breaking up the list from its parent text? No.
    • Custom bullet images: Incorrect alignment across browsers.

Read more here : How to Style Perfect HTML Bullets

For quick reference, to edit the spacing between the bullet and the margin;

UL LI    {
list-style-type: square;
margin-left:-0.1em;
padding-left:-1em;
text-indent:-1em;
}

Leave a Reply

You must be logged in to post a comment.

What Do You Consider Good Design?

Before I proceed, have a look on this site :
http://creativecurio.com/2007/12/what-do-you-consider-good-design/
I’m quite interested in the website part. The writer thinks that

Follow Me!

Follow Me! Follow Me! Follow Me! Follow Me!

Archives

 

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Meta