SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot Run2Web's Avatar
    Join Date
    Apr 2002
    Location
    Indiana
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    INNER LI Positioning

    Code:
    <ul>
       <li class="bold">Fruit Flavored Energy Bars!<br />
    	  <ul>
    		 <li style="list-style:none; display:inline;"><span class="small"> Cherry - Raspberry - Lemon - Orange - Vanilla</span></li>
    	  </ul>
       </li>
    </ul>
    How can I make it so that the inner list is not so far embedded into the page? I want to somehow get the inner list here to be like 5 pixels or so inside the outer LI. Right now it lines up under the "V" in flavored. I would like to get it lined up under the "t" in Fruit

    Hope that makes sense.
    RUN2Web

    Has Anyone seen my Furry Little Mind?

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,379
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You could try something like this:
    Code:
    <style type="text/css">
    ul ul{
     margin-left: 20px;
     padding-left:0px;
    }
    </style>
    I think that should work

    Paul

  3. #3
    SitePoint Zealot Run2Web's Avatar
    Join Date
    Apr 2002
    Location
    Indiana
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Code:
    <style type="text/css">
    ul ul{
    margin-left: 20px;
    padding-left:0px;
    }
    </style>
    ul ul? Is that correct?
    RUN2Web

    Has Anyone seen my Furry Little Mind?

  4. #4
    SitePoint Zealot Run2Web's Avatar
    Join Date
    Apr 2002
    Location
    Indiana
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it to work with your suggestion Paul, Thanks Tons!!!!

    I placed the style definition in the inner "ul" and it works beautifully.
    RUN2Web

    Has Anyone seen my Furry Little Mind?

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,379
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    ul ul? Is that correct?
    Yes it's correct it targets only the inner ul. (i.e the ul inside the ul). Just the same as div p {} would target the pargraph in the div.

    Placing the style in the inner list with a class would have the same effect (I suppose Iwas trying to be clever

    Paul

  6. #6
    SitePoint Zealot Run2Web's Avatar
    Join Date
    Apr 2002
    Location
    Indiana
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, learn something new everyday!
    RUN2Web

    Has Anyone seen my Furry Little Mind?


Bookmarks

Posting Permissions

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