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.

why CSS list's bullets not displayed?

Discussion in 'CSS' started by thosecars82, Apr 9, 2010.

  1. #1
    Hello
    I have a problem with this simple example

    <ul>
    <li>one</li>
    <li>two</li>
    </ul>

    which I tested successfully in a browser. Whenever I include this code in a website, then the bullets do not show up any more.

    I am marking the ul with this css code:

    clear:left;
    padding-top:25px;
    padding-left:20px;
    padding-right:20px;
    font-size:14px;
    line-height:30px;
    text-align:justify;
    font-weight:bold;
    text-transform:uppercase;
    list-style-position: outside;
    list-style-type:disc;

    And the li with this css code:

    display:block;
    line-height:160%;
    margin-bottom:15px;

    Everything shows up as I want except this bullet which is not displayed. However, I did write list-style-type:disc; like you can see in the CSS code for ul tag.

    Moreover, if I remove display:block; from the li's css code, then there is not break between li tags because of a previouse css code in the same CSS file.

    I looked for another piece of code that might over-ride this but did not find it. Moreover, I tried to lower the css code I showed you to the bottom of the file which contains all the CSS code and it did not work either.


    Any other idea?
    Thanks
     
    thosecars82, Apr 9, 2010 IP
  2. ampg-it

    ampg-it Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi

    Have you got a link to the site where the code isn't working?

    Thanks
     
    ampg-it, Apr 9, 2010 IP
  3. thosecars82

    thosecars82 Member

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
  4. ampg-it

    ampg-it Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    there's nothing there
     
    ampg-it, Apr 9, 2010 IP
  5. thosecars82

    thosecars82 Member

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #5
    Sorry,
    could you please check out the link again?
    Thanks
     
    thosecars82, Apr 9, 2010 IP
  6. OhJay

    OhJay Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    div ul li
    	{
    		[COLOR="Red"]list-style-type : none;[/COLOR]
    		display : inline; /* para que ponga los elementos de una lista ordenados horizontalmente */
    	}
    Code (markup):
    That is turning off the list style, hence, no disco.
     
    OhJay, Apr 9, 2010 IP
  7. thosecars82

    thosecars82 Member

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #7
    Thanks, you are right and it works by doing what you said. I thought that a subsequent css code forcing this ul to display:list-item; would fix the issue, but it seems, once the first display:inline code is read for a particular ul tag, then it does not reconvert it to a list if it finds some code which does that later in the css code.
     
    thosecars82, Apr 9, 2010 IP
  8. OhJay

    OhJay Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Firebug is a great tool for hunting out little problems like that. It's a plugin for Firefox. You can select a specific Div or object in the code and it will show you all the CSS which is affecting that element. What's especially useful is that it shows you all the cascaded styles that influence that element as well as the styles specifically targeting that element and will show which ones are being overruled by a duplicate style by showing them with a strike-through to indicate that they are being superceded by another style.
     
    OhJay, Apr 9, 2010 IP