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

CSS

Noor Basheer
Noor Basheer
1,229 Points

Css change for my demo website sidebar

I have a wordpress website, where the sidebar has a default css with a class textwidget . When I inspect element using chrome developer tools, that sidebar has a class textwidget, and I want to change its style. In the style bar , I want to change the body style, which has a default css location of bootstrap.min.css, which cant be edited. So how can I OVERWRITE THAT CSS and where should I overwrite css for that. Can I rewrite it in style.css?

1 Answer

Dani Ivanov
Dani Ivanov
10,732 Points

The problem you are facing is related to specificity. Yes you can overwrite the classes through style.css but in order for the overwrite to work you need to write selectors with higher specificity.

Here you can read more about specificity http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/