Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Jeremy Frimond
Jeremy Frimond
14,470 Points

Beating out the WP Template CSS

Is there a way to over ride css properties in a WP template theme without having to change your css content to ID's or styling inline?

For example, The theme I am using has a rule h1,h2,h3 {clear:both;}

The page I am coding I would like .myclass h1 {clear:right;} which does not work until I change it to #myid h1 {clear:right}

Side Note: I am using a chile theme and not changing template style.css directly.

Nathalie C
Nathalie C
2,594 Points

A method I have used is creating multiple header.php files so that I can call a specific header-(myname).php with the relevant internal <style> css content placed in the head tag.

2 Answers

Matt Campbell
Matt Campbell
9,767 Points

Two options, be more specific with your CSS selector or use !important.

Julian Price
Julian Price
11,760 Points

Look at creating a child theme with just style.css file using the same classes or you can look into a plugin on wordpress that with allow custom CSS teaks in the admin area.