Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts

    Indent level for an li element

    Hi,

    how can i adjust the indent level for an li element in an unordered list.

    Roelf

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Which way do you want to adjust it?

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Experiment with:

    li {
    margin-left: 5px;
    }

    You can also try padding-left;

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That'll probably only work for IE, I could be wrong though.

    ~Quack

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by QuackHead
    That'll probably only work for IE, I could be wrong though.

    ~Quack
    Should actually work in IE5+ and any Gecko-based browser, as well as Opera 5+.

    I'm not sure about IE4.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    thanks, the margin-left property worked fine for me

  • #7
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    I use div element for better results :
    Code:
    <div style="width:640px;">
    	<ul>
    		<li style="margin-left:20px;">Intended 20 pixels</li>
    		<li>Not intended</li>
    	</ul>
    </div>
    Zvona
    First Aid for
    Web Design


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •