Forums

[resolved] How to prevent bullets from appearing on list items for specific widgets (7 posts)

  1. reesan
    Member
    Posted 2 years ago #

    hi, I am trying to supress bullets from appearing for a specific sidebar widget. the widget uses the following class for li:

    <li id="top-commentators" class="widget widget_topcomm">

    and my theme's css has:

    #l_sidebar ul li ul li {
    	background: #FFFFFF url(images/arrow.gif) no-repeat top left;
    	padding: 0px 0px 0px 15px;
    	margin: 0px;
    	}

    would be grateful if anybody could tell me what can i add to the css to prevent the bullets appearing for this widget/class.

    my site is: http://www.loneleeplanet.com

  2. Christine
    Moderator
    Posted 2 years ago #

    Try adding:

    #l_sidebar ul li ul {list-style-type:none}

    or

    #l_sidebar ul li ul li {list-style-type:none}

  3. reesan
    Member
    Posted 2 years ago #

    hi crondeau, thanks for you reply.

    i am looking to single out one widget in the sidebar and not change the behaviour for the entire sidebar.

    don't i need to specify a class?

    apologies if this is an ignorant question.

  4. Christine
    Moderator
    Posted 2 years ago #

    yes, then you would need to use the following:

    #l_sidebar ul li ul li.widget_topcomm

    or

    #l_sidebar ul li.widget_topcomm li ul

    depending if you're list tag <li id="top-commentators" class="widget widget_topcomm"> is the second or first one.

  5. RGlover
    Member
    Posted 2 years ago #

    I would actually go with the following:

    #l_sidebar ul li#top-commentators ul li {
       background:transparent none repeat scroll 0 0;
       list-style-image:none;
       list-style-type:none;
       padding:0;
    }

    As I think that would probably be the most specific possible declaration in this case. Also, it looks to me like the arrow is a background image, and not a list-style bullet image. So I removed the padding and background image. It works using firebug. That should be all you need to add to the CSS to make that happen.

  6. reesan
    Member
    Posted 2 years ago #

    thank you for all your feedback.

    @RGlover, yor advice worked like a charm!

    much appreciated.

  7. RGlover
    Member
    Posted 2 years ago #

    Glad I could help. I like the way you've worked the gravatars in there. That's pretty sweet.

Topic Closed

This topic has been closed to new replies.

About this Topic