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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vertical align text in UL / LI 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
How do you get text / bullet image to vertically align with each other?


I'm getting close to using a table..... nah just kidding, but there has to be a way to line up the bullets with the text, isn't there?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
If you have set a line-height attr to the text in the list then remove it.
Also, you can try to set the vertical-align attr to "top"

 
Uh-oh, now you're going to hate us. The implementation of the image instead of the predefined bullets is not good. There is no way to control the display and in most circumstances it fails. But that's why you can use the background for the bullet -- that works perfectly and it is fully customisable.
 
well I did have line-height, but then removed it.

I've found vertical-align does nothing, I understood this really only works on images, but I think the way an image it placed over the top of a bullet has some issues!

I guess it's not a true image on the page and so that attribute has no effect on it.

I changed my padding to margin and that helped as padding isn't applied to the bullet within an LI, only the content of the LI.

However margin seems to give me the spacing I want and not effect the bullets vs text alignment.

However, although the text/bullets align much better, it still seems imposible to change the position of a bullet/image

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Vragabond - Uh-oh, now you're going to hate us.
lol , never, I have nothing but love and respect for my fellow Tek-Tippers.

funny how I came to the same conclusion and was typing it up just as you were submitting this response.

So I take your saying place the bullet as a background to LI and list-style-type:none; , add some left padding to the LI for the text and away you go.

I'll give it a whirl.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Bingo! - thanks Vragabond [2thumbsup]

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top