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 trial

CSS CSS Foundations Getting Started with CSS Adding CSS to a Page

@Import for CSS

Hello-I am using sublime text 2. Using @import didn't work at all for adding css. I tried it both in the html file ad css file. Any ideas what could be wrong? Thanks!

1 Answer

Rose Hurst
Rose Hurst
5,658 Points

To import another stylesheet into an existing stylesheet you would use the @import ``` @import url("another-stylesheet.css");

To import directly into an html file you would use the following between the head tags

<link rel="stylesheet" type="text/css" href="css/another-stylesheet.css" />

You will also want to watch the position you adding the second stylesheet, you could inadvertently overwrite some rules.

Thank you!