aschultz 0 Report post Posted March 14, 2011 Hi There, I'm using Disqus, if it matters. I've removed the "View Comments" link from the individual post header, and added a background image to the post headers on the POSTS pages. However, because the class is "post-comments" for both places, I'm getting an empty background image showing up on individual hosts. I'm not sure how to tell the CSS to not show the background image for the post but to show it on the POSTS page. Blog: http://andrewbschultz.com/blog Share this post Link to post Share on other sites
Simon 248 Report post Posted March 14, 2011 Use firebug to narrow down the css, and then hide it with `display:none;` Share this post Link to post Share on other sites
aschultz 0 Report post Posted March 14, 2011 That's what I was doing; but the question is how to differentiate between the "POSTS" page and the individual post page. Both are in the post-comments class. Share this post Link to post Share on other sites
bryan-hadaway 3 Report post Posted March 15, 2011 `.blog` and `.single` When using Firebug scroll up to: ` Share this post Link to post Share on other sites
aschultz 0 Report post Posted March 15, 2011 I've gone all the way up to the "body" tag in the HTML, but there are two div tags that don't have classes - how do I note those? For example: <body class="1"> <div id="3"> <div id="4"> <div id="page" class="5"> So how would you denote this hierarchy in CSS? If I skip those without a class (i.e. body.1 div.5) it doesn't work, but it doesn't work if I use the ID as the class (i.e. body.1 div.3 div.4 div.5). I'm kind of surprised that they structure is so similar that you have to go that far up the html to find a unique tag. Share this post Link to post Share on other sites
aschultz 0 Report post Posted March 15, 2011 I don't see the .blog and .posts classes, Bryan - my classes are: logged-in fixed_width buddypress ttype-posts tmain-posts and logged-in single single-post postid-1771 single-format-standard fixed_width buddypress ttype-single tmain-single And my last post still applies - how to I specify the body when there are tags with no classes in the hierarchy between the post-comments and the body tags? Share this post Link to post Share on other sites
bryan-hadaway 3 Report post Posted March 15, 2011 - The first one would help to see the page. - The second you can use `.single-post` - For the first hierarchy issue sounds like you might want to learn about pseudo selectors: http://reference.sitepoint.com/css/pseudoclass-firstchild Thanks, Bryan Share this post Link to post Share on other sites
aschultz 0 Report post Posted March 15, 2011 Thanks Bryan, that's it! I can actually just use post-comments for the first one (the POSTS page), but I needed to reference the single post page separately to get rid of the formatting I was applying to the POSTS page. body.single-post div.one-sidebar-right div:first-child div:first-child div.container-group div.outline div.container div.texture div.content div.content-pad div.one-sidebar-right div.fix div.mcolumn div.mcolumn-pad div.copy div.copy-pad div.post div.post-meta div.post-header div.post-title-section div.post-title div.metabar span.post-comments{ background-image: none; margin-top: 0px; display: inline; } Share this post Link to post Share on other sites
cmunns 16 Report post Posted March 15, 2011 Hey Andy you don't actually have to list all div in between the parent and the 8th child. It probably would have sufficed as: ` body.single-post div:first-child div:first-child .metabar span.post-comments{ background-image: none; margin-top: 0px; display: inline; } ` for example, or even less...I'm not sure in this case...but just know that for future reference. Share this post Link to post Share on other sites