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:
- There is no distinct spacing between list items, which is annoying when reading list items that contain multiple lines.
- 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.
- Spacing Issues:
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;
}