How to include an additional CSS file

Here is an article on adding additional CSS files to your theme. This may come handy if you prefer to have separate CSS files to manage your project more efficiently.

Drupla.org: How to Call Additional CSS Files

Or you could use @import "rule" within your CSS file to access the secondary CSS file.

w3.org: The @import rule

==============

The '@import' rule allows users to import style rules from other style sheets. Any @import rules must precede all other rules (except the @charset rule, if present). The '@import' keyword must be followed by the URI of the style sheet to include. A string is also allowed; it will be interpreted as if it had url(...) around it.

Example(s):

The following lines are equivalent in meaning and illustrate both '@import' syntaxes (one with "url()" and one with a bare string):

@import "mystyle.css";
@import url("mystyle.css");

So that user agents can avoid retrieving resources for unsupported media types, authors may specify media-dependent @import rules. These conditional imports specify comma-separated media types after the URI.

Example(s):

The following rules illustrate how @import rules can be made media-dependent:

@import url("fineprint.css") print;
@import url("bluish.css") projection, tv;

In the absence of any media types, the import is unconditional. Specifying 'all' for the medium has the same effect.

Comments

Software development Orange County

I would like to thanks for the efforts you have put in writing this blog. I am
hoping the same high-grade blog post from you in the upcoming as well.I agree that
a web designer must have a creative approach and must have a understanding of user.
The design of webpage and content must inter related so the user can interact with
it.A web designer must be very knowledgeable.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.