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 trialsavan patel
2,272 Points@import is not workming in external style sheet
@import "css/import-styles.css";
if i use upper text in my html it works nut when i use this in my external stylesheet its not working snymore so what sould i do ?
2 Answers
annabrandt
6,094 PointsAnother style to this is also: <style> @import url("style.css"); </style>
To add url after @import as you can see works for me.
savan patel
2,272 Pointsi got it man thank you
Christof Baumgartner
20,864 PointsChristof Baumgartner
20,864 PointsYou said "when i use this in my external stylesheet". When you are using this in your external style sheet, you don't have to specify the path to your css-directory. So
@import "import-styles.css";
in your external stylesheet should work.
Alternatively you could add
to your index.html