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 trialMandeep Bhasin
1,475 PointsAfter activating my Child Theme, my website CSS does not work properly anymore. It is mest up, shows only the HTML!
It goes wacky. My website is deepsoulfusion.com I made a child theme of the theme DIVI by Elegant Themes. I added the functions.php as well. here is my code:
/* Theme Name: Divi Theme URI: http://www.elegantthemes.com/gallery/divi/ Description: Elegant Themes Author: Mandeep Bhasin Author URI: http://deepsoulfusion.com Template: Divi Version: 1.7 Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: Created by Mandeep Bhasin */ @import url("../divi/style.css");
/* =Theme customization starts here -------------------------------------------------------------- */
3 Answers
Erin Manahan
20,413 PointsI think something went wrong when you uploaded your files to your server. When looking in your wp-content/theme/divi files, the stylesheet for your main theme (divi) is blank, so when you're importing those styles in your Divi-child theme stylesheet, you aren't currently importing anything.
I'm also still learning wordpress, so I could be wrong, but I think that may be why your styles aren't showing up. I would try uploading your files again and make sure the main style.css for the parent theme is there.
Zac Gordon
Treehouse Guest TeacherAlso, make sure you are linking to your CSS in your functions.php file if needed.
Mandeep Bhasin
1,475 PointsThank you so much guys for your help! I just looked at my CSS and a light bulb just went off, Divi was not capitalized in my CSS file so that is why it was not importing correctly...Learned the lesson..Thanks!
mariarobinson
12,580 Pointsmariarobinson
12,580 PointsInclude the parent theme folder (directory) as 'template name' to carry the css from the parent to the child theme.
Go to https://codex.wordpress.org/Child_Themes for further information.