View Single Post
Old 04-18-2014, 06:07 PM   #1
marst
Connoisseur
marst began at the beginning.
 
marst's Avatar
 
Posts: 72
Karma: 10
Join Date: Mar 2011
Location: Left coast, USA
Device: Kobo Forma; Android tablet w/Mantano Reader
Controlling indents for bulleted lists

(Apologies-in-advance if this should have been posted in a different part of the forums -- this does pertain to creating lists that will end up in EPUB files.) I've been trying to create hanging bulleted text as shown in the attached screen shot -- to control left margin of the list and also the space between bullets and their associated text. It seems impossible with a standard "unordered list" -- you're stuck with the default bullet-to-text space.

Multiple trips to Google and Stack Overflow suggest it can be done with adjacent elements each with CSS definitions that include "float:left". The first would contain the bullet character, and the second the associated text. But so far every experiment with this has produced problems:

1. As soon as the text associated with a bullet is long enough to wrap at the edge of the window, the whole block of text moves below the bullet.

2. Any paragraph below the second of the elements with "float:left" "collapses" into the block of text above it.

3. Changing the size of the bullet (the sole content of the first element with "float:left") shifts the bullet upward or downward, mis-aligning it.

This kind of thing is so simple in Word or in page-composition programs. There must be a way to do it via CSS without these alignment problems. Advice much appreciated...
Attached Thumbnails
Click image for larger version

Name:	hanging-bullets.png
Views:	234
Size:	11.2 KB
ID:	121842  
marst is offline   Reply With Quote