How to load parent/child css files via link instead of @import?
I have created a child theme for my site that imports the Magazine Basic parent theme’s css file using this line of code: @import url(“../magazine-basic/style.css”).
My child theme contains three files: style.css, header.php and footer.php
In order to reduce page loading delays, I want to link to the two style sheets so that they load in parallel.
If I delete the @import code in the child style.css file and place the two lines below in the <head> section of either the parent theme header file or my child theme header file…
<link rel=”stylesheet” type=”text/css” href=”www.mydomain.com/wp-content/themes/magazine-basic/style.css”>
<link rel=”stylesheet” type=”text/css” href=”www.mydomain.com/wp-content/themes/magazine-basic-child/style.css” >
….the result is my page gets all messed up (menus are listed vertically on the left, etc.)
I’m not sure what I’m doing wrong.
I’ve searched the parent files to see where the CSS is called but cannot find it.
Thanks for any suggestions.
- The topic ‘How to load parent/child css files via link instead of @import?’ is closed to new replies.