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

li indent width

Status
Not open for further replies.

2781

Technical User
Feb 26, 2002
21
BE
How do I adapt the indenting width of a list item (li)
 
2781, use CSS, simple and very effective.
Something like this will do the job:
Code:
<html>
<head>

<style>
li {padding-left: 90px;}
.test {padding-left: 30px;}
</style>
</head>

<body>
This calls the <li> style command directly, it will move any and all <li>'s 90 px. in:
<li> This is moved in 90 px.</li>
<li>This is it again</li>
<li>This is over</li>
<li>This is begining</li>
<br><br><br>
This calls the &quot;test&quot; class and will only move that amount of px. in when the &quot;test&quot; class is called:
<li class=&quot;test&quot;>This is 60 px. in</li>
<li class=&quot;test&quot;>This is cool</li>
<li class=&quot;test&quot;>This is fun also</li>
</body>
</html>


I have this little thing, Advanced Delusionary Schizophrenia with Involuntary Narcissistic Rage.
It's no big deal really...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top