Jump to content

Why do people use @import 'another_css_file.css' ? Pro's and cons?


Guest kilbad

Recommended Posts

Guest kilbad
Why do people use @import 'another_css_file.css' in their main css file?  Why not just link to the other sheet in the page header?  Is there a benefit to doing it this way?

thanks! Brendan
Link to comment
Share on other sites

http://www.hwg.org/resources/faqs/cssFAQ.html#import

And older version of Netscrap couldn't understand @import and thus ignored it, allowing what amounts to a Netscrap-compatible style sheet plus imported styles for other browsers.
Link to comment
Share on other sites

I normally have something like this (well this exact, its copied from one my websites)

<link href="spaininland.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="spaininlandie.css" rel="stylesheet" type="text/css" />
<![endif]-->

This sorts out some crap just for IE
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.