1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how to create a bullet list [ul li]?

Discussion in 'CSS' started by driven, Nov 13, 2006.

  1. #1
    on this site, i'm trying to create a list . You'll see my attempt so far but unsuccessful.

    I thought the code was

    ul li {
    list-style: circle:
    }
    
    Code (markup):
    but I seem unsuccessful. What am I doing wrong here?
     
    driven, Nov 13, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try ";" instead of ":" :)
     
    disgust, Nov 13, 2006 IP
  3. driven

    driven Well-Known Member

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #3
    driven, Nov 13, 2006 IP
  4. glorie

    glorie Peon

    Messages:
    123
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    try

    
    #navlist li
    {
    [B]list-style-type:circle;[/B]
    margin: 0;
    display: inline;
    }
    
    Code (markup):
     
    glorie, Nov 13, 2006 IP
  5. dp-user-1

    dp-user-1 Well-Known Member

    Messages:
    794
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #5
    glorie's right. (I think.)
     
    dp-user-1, Nov 13, 2006 IP
  6. driven

    driven Well-Known Member

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #6
    nope-that's not it either. and besides, that would only affect my horizontal tab navigation but not the lists that are created in the content section.

    here is what I have for code for my lists. Perhaps the solution is somwhere in here?


    
    /* --- lists --- */
    
    #list p ul li {
    	list-style:circle;
    	margin: 0;
    	padding: 0;
    	}
    
    
    ul, ol {
    	list-style-type: circle;
    	margin: 0;
    	padding: 0;
    }
    
    ul {
    	list-style: circle;
    	}
    
    ul, li  {
    	list-style-type: circle;
    	margin-left: 15px;
    	padding: 0;
    	}
    
    ul.postmetadata li {
    	display: inline;
    	margin: 0 5px 0 0;
    	font-size: .9em;
    	font-weight: bold;
    	list-style-type:circle;
    }
    
    ol {
    	list-style: circle;
    	}
    
    ol li {
    	list-style: circle;
    	}
    
    Code (markup):
     
    driven, Nov 13, 2006 IP
  7. dp-user-1

    dp-user-1 Well-Known Member

    Messages:
    794
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #7
    Strange, I had a list on my site and didn't use any css. What's wrong with the one you have? You want bullets?
     
    dp-user-1, Nov 13, 2006 IP
  8. glorie

    glorie Peon

    Messages:
    123
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Sorry I got the wrong div id on the previous one.

    the reason why it's not displaying is because you declared

    
    ul, ol {
       list-style: none;
       margin: 0;
       padding: 0;
    }
    
    Code (markup):
    ... so all ul will have no list style

    if you add this, it should work

    
    #copy  li {
      list-style-type:disc;
      margin-left: 14px;
    }
    
    Code (markup):
     
    glorie, Nov 14, 2006 IP
    driven likes this.
  9. codyturk

    codyturk Well-Known Member

    Messages:
    339
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #9
    This is a good topic thank you for posting.:)
     
    codyturk, Nov 14, 2006 IP
  10. driven

    driven Well-Known Member

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #10
    The CSS gods must really hate me because that doesn't work either. Ughhh. I'm really surprised that it's this hard for us to figure it out because I've never had this issue before until now.

     
    driven, Nov 14, 2006 IP
  11. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #11
    At the top of your style sheet in the overall element rules, put this:
    
    ul {
        list-style: circle;
        }
    Code (markup):
    That will set the default list to a circle list marker, set outside the list item, and using a 40px indention. Loosely like so:

    • item 1
    • item 2
    • item 3

    If, in any section, you want something different, you can override it using more specific selectors.

    cheers,

    gary
     
    kk5st, Nov 14, 2006 IP
    driven likes this.
  12. driven

    driven Well-Known Member

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #12
    Gary- I already have that code listed within my stylesheet and it still doesn't work.

    I also tried being more specific by using ul li for the content but still no go;

    
    /* --- content divisions --- */
    
    #content-container {
      padding: 0;
      margin: 0;
      position: relative;
    }
    
    #content-wrap {
       margin: 20px 0 0 0;
       padding: 20px 10px 0 10px;
    }
    
    #copy {
       float: left;
       width: 480px;
       padding-right: 5px;
       margin: 20px 0 30px 0;
    }
    
    #copy ul { 
    	list-style-type:disc;
    	margin-left: 14px;
    	}
    	
    #copy ul li {
    	list-style-type: disc;
    	margin-left: 14px;
    	}
    
    Code (markup):
     
    driven, Nov 14, 2006 IP
  13. DatR

    DatR Peon

    Messages:
    210
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #13
    i put this locally to test and it showed up (just change the margin to something smaller to be where you want it to be)

    ul li {
    list-style: disc;
    margin-left:125px;
    }

    you have to make list-style to be disc for the circle and put some margin on it so it doesnt get hidden

    alternately if you make these lines:
    
    /* --- lists --- */
    
    ul, ol {
       list-style: none;
       margin: 0;
       padding: 0;
    }
    
    Code (markup):
    into this
    
    /* --- lists --- */
    
    ul, ol {
       list-style: disc;
       margin: 35px;
       padding: 0;
    }
    
    Code (markup):
    your problem is fixed as well
     
    DatR, Nov 14, 2006 IP
    driven likes this.
  14. driven

    driven Well-Known Member

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #14
    yes- it finally works. thanks for helping DatR and everyone else. The css drama is finally over. whew. i really appreciate it.
     
    driven, Nov 14, 2006 IP
  15. DatR

    DatR Peon

    Messages:
    210
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #15
    no problem, glad I could help
     
    DatR, Nov 14, 2006 IP