Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

line item spacing

Status
Not open for further replies.

famtek

Instructor
Mar 27, 2007
67
US
I have an <UL> with numerous <li> and want to increase the spacing between each <li>.
Would also like to modify space between the bullet and the text.
Where can I find more thorough details on modifying lists.

Help. thanks.
 

This is a good article on dealing with lists, however, I don't know if it truly touches whatever you want. If you want to control the gaps between list items, work with top/bottom margins on li elements. If you want to control the difference from the bullet to the text, you will have to use list-style-position: outside;. I don't think inside position has an option of setting different spacing. Then play around with the left padding on the li element again.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
The margin works great. Is there any way to change the bullet color without changing the text?

thanks.
 
I don't know about that, but you could use CSS to use whatever image you wanted. If that image looked like a purple dot, or a green star, then you would get your desired affect. You could do this with the list-style-image attribute, like this...

Code:
<ul>
	<li style="list-style-image:url([URL unfurl="true"]http://www.tipmaster.com/images/blush.gif)">Item[/URL] 1</li>
	<li style="list-style-image:url([URL unfurl="true"]http://www.tipmaster.com/images/blush.gif)">Item[/URL] 2</li>
	<li style="list-style-image:url([URL unfurl="true"]http://www.tipmaster.com/images/blush.gif)">Item[/URL] 3</li>
</ul>

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
i believe some browsers will change the bullet color if you set the "color" style for the UL itself. you'll need to specifically set the LI to a different color if you don't want them to be the same color as the bullets.

however, i recommend using an image as George said, or not worrying about it - since it's not 100% compatible.



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top