Jump to content
Sign in to follow this  
aschultz

Different Formatting for Post Header and Posts Header

Recommended Posts

aschultz

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

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

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

`.blog` and `.single` When using Firebug scroll up to: `

Share this post


Link to post
Share on other sites
aschultz

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

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
aschultz

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×