Jump to content


Un/Ordered List indentation sizes?


4 replies to this topic

#1 Zebbedy

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 16 February 2006 - 09:46 AM

Im playing with a simple unordered list for a left side navigation. I have limited room and one or 2 long section names. The indentation on the left of my list values is larger than i would like. I am not using an image or bullet to mark the values yet i seem to have a 20-30 pixel indentation before them.

Is there any way to reduce this indentation size?

My boss doesnt want to use css dropdown menus but would rather have the options appear as a sub-list inside the nav menu. My problem is that i dont even have enough room for the top tier of menu options. I would just have enough room if i could move my list about 15 pixels left to almost hug the left margin of my Nav area.

Is there a command i can put into my <ul> tag that allows me to do this?

Thanks

#2 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 16 February 2006 - 01:11 PM

ummmmmmmmmmm padding:0;margin:0; in the ul and li's of the lists

#3 Stu

    Retired P2L Staff

  • Publishing Betazoids
  • PipPipPipPip
  • 1,761 posts
  • Gender:Male

Posted 16 February 2006 - 09:15 PM

one way to do it if you are not using images (i think) is to add

ul{
padding: 0;
margin: 0;
}

li{
display: block;
padding: 0;
margin: 0;
}

however the main problem is when you use that your images will not appear

Edited by Stu, 16 February 2006 - 09:23 PM.


#4 Zebbedy

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 17 February 2006 - 08:41 AM

Thanks guys i'll give that a go.

I do have a small image to the left of the list so i may have to find a workaround for that, maybe make it a background as i'm still very transitional in my code. One day i'll get to the xhtml/css pure stage. :)

Zeb

#5 Stu

    Retired P2L Staff

  • Publishing Betazoids
  • PipPipPipPip
  • 1,761 posts
  • Gender:Male

Posted 17 February 2006 - 08:48 AM

i was having the same problem as i was using an image, the following works for me though:
ul{
padding: 0;
margin: 0;
border-bottom: 1px dashed #EFEFEF;
}

li{
list-style-image: url("images/li.png");
padding: 0;
margin-left: 20px;
}






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users