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!

<li> bullet-number positioning 1

Status
Not open for further replies.

mgriffith

MIS
Jul 3, 2001
177
US
is there a way to move the bullet or number list item prefix closer to the text?

i'm getting something that looks like this

1. hello
2. item 2


(ok a bit exaggerated), but i want it to be like this
1. hello
2. item 2

li {padding: 0px; margin: 0px;} doesn't seem to do anything...any other ideas?

thanks. mike griffith
----------------------------
mgriffith@lauren.com
mdg12@po.cwru.edu
 
try 'indent' or 'text-indent' - one of those may work for you Tony
reddot.gif WIDTH=300 HEIGHT=2 VSPACE=3

 
<li style=&quot;padding-left:1px&quot;>hello
<li style=&quot;padding-left:1px&quot;>item 1

or apply class, ie

<style>
.LIPadding {padding-left:1px}
</style>

<li class=LIPadding>hello
<li class=LIPadding>item 1
 
Hi Mike,

I'm sorry to say Tony and sjravee, but text-indent or padding-left only has affect the total <li> {bullit + text)

Mike wants to get the text closer to the bullit.
This is what you need, Mike:

<li><span style=&quot;margin-left:-10px; position:absolute; &quot;>text 1</span></li>

- instead of span you can use also div or font
- I think -10 is the closest to the bullit
- If you define a positive integer the text will move to the right (from the normal staring point).

see here the difference:

<li><span style=&quot;margin-left:-10px; position:absolute; &quot;>text 1</span></li>
<li>text 2</li>
<li style=&quot;padding-left:2px;&quot;>text 3</li>
<li style=&quot;text-indent:2px;&quot;>text 3</li>

<li><span style=&quot;margin-left:-10px; position:absolute; &quot;>text 1</span></li>
<li>text 2</li>
<li style=&quot;padding-left:5px;&quot;>text 3</li>
<li style=&quot;text-indent:5px;&quot;>text 3</li>
<li style=&quot;padding-left:-5px;&quot;>text 3</li>
<li style=&quot;text-indent:-5px;&quot;>text 3</li>

Hope this helps,
Erik

My sport: Boomerang throwing !
Between 30 jul - 8 aug. I participate at the World Championships.
30/7-3/8 = TEAM cup (I'm in TriNationalTeam -TNT).
6/8-8/8 = Individual cup (Erik Leferink and my son Tim).
My goal in both ranglists is to end within the first 50%. For LIVE scores during the tournament:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top