Jump to content
Sign in to follow this  
teeskie

Select H1 in specific category's posts?

Recommended Posts

teeskie

So I'm looking to change the h1 css for posts in a specific category. So far I've got:

body.category-12 .h1{
	font-size: 50pt;
	}

But it does nothing :( Is it possible to target h1 just in posts under a certain category?

Share this post


Link to post
Share on other sites
Danny
Hi Teeskie, I think your code maybe slightly incorrect, try the below instead please. [code]body.category-12 h1{ font-size: 50pt; }[/code] If this doesn't work please provide a link to your website please.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
teeskie
Hey Danny, Thanks for your quick response. Site is nzcyf.org.nz and Im trying to target the h1 on the posts in the /video-entry/ category only. Cheers! Tim

Share this post


Link to post
Share on other sites
catrina
Can you please provide a direct link to the video entry category? I can't find the link in the navigation your website.

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
teeskie
Hey Catrina, I want to target any posts in the category "Video Entry" eg: http://nzcyf.org.nz/video-entry/film-the-turning-point/ All posts: http://nzcyf.org.nz/video-entry/ Currently just targeting h1 for full width pages, but not ideal :) Thanks! Tim

Share this post


Link to post
Share on other sites
Jenny
Hi Tim. I don't think you can target the CSS of individual posts within a certain category. I could be wrong, but I don't think so. You can target posts on the category page itself (/video-entry/) and target posts themselves (/film-the-turning-point/ is .postid-841). The second option is going to be your best choice, although more time intensive. You should be able to target the h1 for the above post with: [code].postid-841 h1.entry-title { font-size: 50px; }[/code] Just change the postid-xxx for each post.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
teeskie
Ok cool, I can target a specific post/page, but can't get it sorted for all posts within a category.. Is this possible?

Share this post


Link to post
Share on other sites
Danny
Hi Tim, Can you provide a link to the exact category please.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
teeskie
Hey Danny, Unfortunately I had to solve this, so ended up targeting: [code].fullwidth #column-main .mcolumn-pad h1[/code] Which works for now because the category I was targeting is the only category with full width posts. This was a post in the category I've used the above solution: http://nzcyf.org.nz/video-entry/film-the-turning-point/ But lets say I want another category like: http://nzcyf.org.nz/fake-category/fake-post/ And instead of a red banner, it should have a blue banner for the

tag. Is it possible to say something like [code] .category-ID h1{ background-image:/blue-banner,png }[/code] That hasn't worked for me.. Category ID is 12 Thanks! Tim

Share this post


Link to post
Share on other sites
catrina
[code]background-image:/blue-banner,png[/code] ^ This code must look like this: [code]{background-image: url('http://FULLIMAGEURLFORBLUEBANNER');}[/code]

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  

×