Jump to content
Sign in to follow this  
buddhistwhatson

Different css for different category posts

Recommended Posts

buddhistwhatson

Hi; I would like to css different category post elements differently. I searched the forum, and the best i could do was this; .category-78 div#post-title .entry-title { -moz-border-radius: 6px; -webkit-border-radius: 6px; font-family:Helvetica,Gill,sans-serif !important; font-size: 1.6em !important; margin-top: -11px; padding: 5px 14px; background: #DEDEDE; width: 593px; margin-left: -19px; } but it doesnt work. Category #78 is valid but the css does not apply This was my original code and it worked, but it changed every category post title. --------------------- .single-post .entry-title { -moz-border-radius: 6px; -webkit-border-radius: 6px; font-family:Helvetica,Gill,sans-serif !important; font-size: 1.6em !important; margin-top: -11px; padding: 5px 14px; background: #DEDEDE; width: 593px; margin-left: -19px; } ---------------------- It looks like it should be easy, but im stuck. Please advise. You can see the entry title here "Just Easy Meditation" http://www dot buddhistwhatson dot com/featured-classes/just-easy-mediaton/ Thank you

Share this post


Link to post
Share on other sites
Kate

On the page you linked to, I don't even see .category-78.

Share this post


Link to post
Share on other sites
buddhistwhatson

Hi Kate; Thanks for your patience. In Firegbug i cannot see the category of post either, but im trying to follow the relevant posts in your forum. Maybe i'm doing itwrong. The page i linked to is a post. It was created using category 78, i would like to be able to style all posts from that category differently. I am doing something wrong? Please find screen shots attached. LIev2UaiqH5GWX7349eefnM6MNWBcj8h7VfOdDNkVLWY3

Share this post


Link to post
Share on other sites
buddhistwhatson

Hi??? i tried that but the css is not applying to the element. I don't understand why. Please, what else can you advise?

Share this post


Link to post
Share on other sites
buddhistwhatson

Hi, I just used the full css path, and put the body.category-78 in front ---- body.category-78 html.cufon-active body.single div#site.two-sidebar-center div#page div#page-canvas div#page-main.container-group div#dynamic-content.outline div#maincontent.container div.texture div.content div.content-pad div#pagelines_content.two-sidebar-center div#column-wrap.fix div#column-main.mcolumn div.mcolumn-pad div#theloop.copy div.copy-pad div#post-4576.post-4576 div.post-meta div.post-header div.post-title-section div.post-title h1.entry-title{ -moz-border-radius: 6px; -webkit-border-radius: 6px; font-family:Helvetica,Gill,sans-serif !important; font-size: 1.6em !important; margin-top: -11px; padding: 5px 14px; background: #DEDEDE; width: 593px; margin-left: -19px; } ---- Still no effect. What can it be? Thanks

Share this post


Link to post
Share on other sites
buddhistwhatson

I'm wondering, do i have to add new code to index.php to be able to use body.category , or post.category? I tried. post but it also didnt work. The css works until i use the category-slug code, but i need to style posts by category Please help

Share this post


Link to post
Share on other sites
catrina

I notice that in the screencap of the post's category selection, it has a subcategory checked under the "Features" category (ACT/NT). That could be it. You'll the category ID for that subcategory and apply it to the CSS selector, not the "Features" category ID. Even though the subcategory belongs to that parent category, it's still a separate category.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

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  

×