• Resolved Aureola

    (@aureola)


    Hi,

    I’m hoping someone can help me figure this one out, cause I’m at the end of my wits… For some reason, the items in my sidebar have bullets, although I have specifically told it not to.
    When I look at the code in the code inspector, the ul gets its formatting from user agent stylesheet (that is, my browser thinks that there is no css styling these items):

    ul, menu, dir {
    list-style-type: disc;}

    Although in my stylesheet I’ve this:

    #sidebarRight, sidebarLeft ul {
            list-style: none;
       }

    The ul is inside the div with the id “sidebarLeft”.
    Can anyone help me out with an explanation as to why my css is overridden?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Michael

    (@alchymyth)

    this looks like wrong selectors:

    #sidebarRight, sidebarLeft ul {

    try:

    #sidebarRight ul, #sidebarLeft ul {

    please post a live link to where the problem can be inspected; there is no other way to help with formatting issues.

    Thread Starter Aureola

    (@aureola)

    Oups. I must have been really really tired or as always expecting things to be much more difficult than they are just because this is WP and I’m new to it.
    You are of course right. I totally missed the extra #.

    Thread Starter Aureola

    (@aureola)

    Hi again.. I’m back with the exact same problem once more, and now I do have my selectors written properly. I’d like to attach a screenshot to let you see what is going on as my wp-site is not yet up on the web, but seems that I can’t do that here.. I’ll try to describe;

    I added the exact same php statement to both of my sidebars to retrieve some list, but although the unordered list elements show up correctly in the left sidebar, it gets bullets in the right one. I see in the code inspector that this time, it’s not list-style but list-style-type that is the felon… But I can’t change it with adding list-style-type: none; to the same selectors. The code:

    #sidebarRight, #sidebarLeft ul {
            list-style: none;
            list-style-type: none;
            padding: 15px;
       }

    Yet the user agent style sheet says
    list-style-type: disc;

    and also overrides the padding:15px. There is nothing I can do about it, my own style definition is striked through. When in the browser’s code inspector I “add” the code list-style-type: none; to the boilerplate.css which is the first css I include, before my own stylesheet, then it obeys and removes the bullets. But this file should not be touched I’ve read, and until this point I never had the reason to do so.

    Anyone..?

    Aaron T. Grogg

    (@aarontgrogg)

    Without a URL to inspect, this is only a guess, but you are applying the list-style: none to the <ul>, which would normally cascade down to the <li>, maybe try applying your styles directly to the <li>, like:

    #sidebarRight, #sidebarLeft li {<br />
            list-style: none;<br />
            list-style-type: none;<br />
            padding: 15px;<br />
    }

    Thread Starter Aureola

    (@aureola)

    Thanks Aaron, but it didn’t work.

    The list-style-type is striked through both for the li and the ul, and user agent style sheet list-style-type:disc; is still the one that rules. (Inherited from ul, it says…)

    THe big question is, why does it work flawlessly in the left sidebar, the code is the same for both sidebars. I notice one difference in the code inspector: When I inspect the list in the correctly working sidebar, I see that the browser reads from my own stylesheet first; and THEN from boilerplate.css. But in the non-working sidebar it’s the other way around; it reads boilerplate first (although there is no styling of list-style-type in boilerplate), and then comes user agent style sheet, and lastly, “my-style-sheet.css”; and there is the striked through list-style-type:none.

    Aaron T. Grogg

    (@aarontgrogg)

    Would need a link to be sure, can you provide one?

    Thread Starter Aureola

    (@aureola)

    I’ll try to make room for this WP -page on my own wp-page, I hope it won’t destroy anything on my own site… I’ll be back shortly.

    Thread Starter Aureola

    (@aureola)

    Actually I can’t do this. I already have one WP-installation on my own domain, with it’s database. There is no way to have another one according to the web hotel. ?? I have nowhere else to put it.

    Edit: I will try to make a subdirectory on the live site with the wp-version of it.

    Aaron T. Grogg

    (@aarontgrogg)

    ?you could also make a flat-version of the page, as long as it is linking to the same CSS files as the site you’re developing…?

    Thread Starter Aureola

    (@aureola)

    I’m going for the full transfer of the entire wp-site. However I’m missing some information from the site owners, stuff that I need to change in wp-config.php, and I’m not sure I will get it today. Hope you guys are here tomorrow to help me out then?

    Thread Starter Aureola

    (@aureola)

    phew.. finally made it! The web site can now be found here:

    https://www.ct-equestrian.com/wp/wordpress/

    Thread Starter Aureola

    (@aureola)

    Phew.. finally made it, now I have a copy of my wp-site on https://www.ct-equestrian.com/wp/wordpress/
    I would be most thankful if you could help me out with those darn bullets.

    Aaron T. Grogg

    (@aarontgrogg)

    So, the CSS that I see is:
    #sidebarRight, #sidebarLeft li { ... }

    Shouldn’t it be:
    #sidebarRight li, #sidebarLeft li { ... }
    ??

    Thread Starter Aureola

    (@aureola)

    Yes Aaron, you are absolutely right. Thing is.. I can’t remember that I have ever needed to write the selector twice before, like this, so this is kind of new to me. I’ll look through the rest of the code cause I know I have made this mistake on several places.
    Anyway. Big thanks! And it’s good also that I made one more step on the to-do-list, that is moving the site to the server, that was supposed to be done anyway. ??

    Michael

    (@alchymyth)

    @aaron is right –

    the selectors are very much the same as I suggested in my reply ??

    #sidebarRight ul, #sidebarLeft ul { ... }
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Can't get rid of the bullets in sidebar’ is closed to new replies.