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!
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
14,470 PointsBeating 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.
2 Answers

Matt Campbell
9,767 PointsTwo options, be more specific with your CSS selector or use !important.

Julian Price
11,760 PointsLook 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.
Nathalie C
2,594 PointsNathalie C
2,594 PointsA 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.