• Resolved pshiplett

    (@pshiplett)


    I’ve consulted the Codex and did due diligence by examining templates etc., but can’t for the life of me understand where the html and css for styling Recent Comments in the Sidebar are being generated.

    url: http://ourconstitutionalrights.com/in-the-news/

    Like Blanche DuBois, I live entirely on the kindness of strangers. Thanks, everybody…Pat

Viewing 3 replies - 1 through 3 (of 3 total)
  • The markup is coming from the Recent Comments widget that you installed in the sidebar via Appearance/Widgets. Any styling will come from your theme’s stylesheet.

    The HTML is generated by the widget itself and is not editable (or at least I don’t recommend it). The CSS is from the style.css.

    There is not currently any CSS in your theme that is specific to the recent comments. In order to style it directly, you can access the entire list using ul#recentcomments or each individual comment as li.recentcomments. For example, if you want your comments to get off the edges, adding the following to your style.css file will help.

    #sidebar ul#recentcomments {
      margin: 0px 5px;
    }

    I hope this helps. I should note that this is not the cleanest solution. By nature, the recent comments widget is an unordered list (the comments) inside of an unordered list (the widgets). I personally would write more generalized CSS for the widgets and lists-in-lists. However, this is going to effect the style of a large number of other elements. So I’m not going to go into that at this time.

    Thread Starter pshiplett

    (@pshiplett)

    ESMI and Soulsizzle.
    Many thanks to you both.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to style Recent Comments widget in sidebar’ is closed to new replies.