WordPress.org

Ready to get started?Download WordPress

Forums

Removing bullets from only SOME lists in sidebar (4 posts)

  1. simplymother
    Member
    Posted 5 years ago #

    Site is simplymother.com

    Is there a way to do this without creating another class for the two sections I don't want bulleted? My bullets are actually background images, coded like this:

    #sidebar ul li {
    	list-style-type: none;
    	margin: 0;
    	padding: 0 0 2px 17px;
            background:url(images/triangle.png) 0px 4px no-repeat;
    	}

    And I don't want them showing up next to my search box or my book images (not up yet).

    I tried a search, but maybe not for the right terms. I did find one thing where the person said she used <ul class=block>, but didn't give much detail (and what I tried didn't work).

    But I'm hoping there's a simple answer like that, some code to put in the sidebar.php template around those two things I don't want bulleted?

  2. Josh Leuze
    Member
    Posted 5 years ago #

    You just need to differentiate the lists from each other, since they are all the same right now, any CSS you apply will affect them all.

    If you had something like this for your bullet-less lists:

    ul class="no-bullets"

    And then a second style for those lists, maybe like this:

    ul.no-bullet li {
    	list-style-type: none;
    	margin: 0;
    	padding: 0;
            background:none;
    	}

    That might do the trick.

  3. simplymother
    Member
    Posted 5 years ago #

    Awesome, just what I was looking for. It worked, and was much easier than I anticipated. Thank you so much!

  4. Josh Leuze
    Member
    Posted 5 years ago #

    No problem simplymom, you are very welcome :)

Topic Closed

This topic has been closed to new replies.

About this Topic