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 trialBiswadip Dasgupta
339 PointsWhy is the styling in my child theme being overridden by bootstrap in the parent theme?
For example I want to change the colour of the jumbotron class in my child theme. But when I make the change in style.css of my child theme and look in the Developer tools of the browser I can see that the changes in my child theme are being overridden by the styles defined in the bootsrap css file in the parent theme. Do I need to import bootstrap into my child theme as well?
1 Answer
Biswadip Dasgupta
339 PointsOK I managed to fix it. In functions.php you need to enqueue the bootstrap and css files in the parent theme BEFORE the style.css file in your child theme (then the styles in your child theme are loaded after the bootstrap and style files in the parent theme and so override them).
johannbillar
9,028 Pointsjohannbillar
9,028 PointsHi Biswadip - I'm having a similar issue... I created a child-theme for the bootstrap-theme, created in this course.
How do I include the child-theme style.css file in the functions.php file so that it loads in the header.php?
Do I include it in the parent functions.php file? Or do I include it in the child's function.php file? And, if so how...?
Thanks! ~Johann