Why do the bullets disappear?

Discussion in 'CSS' started by IanT, Aug 7, 2010.

  1. #1
    I have code in my CSS:

    .bulletList {
    	list-style:circle;
    	text-align:left;
    }
    
    .bulletList li {
    	display:block
    	padding:0 32px;
    }
    Code (markup):

    but when I change
    display: block
    Code (markup):
    to
    display: block;
    Code (markup):
    the bullet disappear? Why does it do that?
     
    IanT, Aug 7, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    each property/value must end in a semicolon if it is not the last one in the entry. In this case, your missing semicolon makes the value invalid.
     
    drhowarddrfine, Aug 7, 2010 IP
  3. IanT

    IanT Well-Known Member

    Messages:
    503
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #3
    see that is my understanding, but however when I add the semicolon the bullets disappear, whereas if I leave it off the bullets appear...
     
    IanT, Aug 7, 2010 IP
  4. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Validate your css once; that could give you some clue. And does bullets disappear in all browser? May be you can post a live url, so that DP members can ave a look at the issue.
     
    radiant_luv, Aug 7, 2010 IP
  5. IanT

    IanT Well-Known Member

    Messages:
    503
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #5
    IanT, Aug 8, 2010 IP
  6. DawnBaby

    DawnBaby Peon

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    try using firebug to determine where the css property list-style-type is being set to none
     
    DawnBaby, Aug 9, 2010 IP
  7. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #7
    Only list items have list markers. Without the {display: block;}, the browser applies the marker as an <li> is {display: list-item;} by default. Add {display: block;}, and you've screwed the pooch. There is no compelling reason to specify block, as a list item is a member of the block group.

    cheers,

    gary
     
    kk5st, Aug 10, 2010 IP