• support@answerspoint.com

Is it possible to include one CSS file in another?

2271

Is it possible to include one CSS file in another?

2Answer


0

Yes:

@import url("base.css");

Note:

  • The @import rule must precede all other rules (except the @charset rule); and
  • Additional @import statements require additional server requests.

Aggregate CSS into one file to avoid multiple HTTP requests. That is, copy the contents of base.css and special.css into base-special.css and reference only base-special.css).

In 2008, not all browsers supported @import (see Browser Compatibility).

  • answered 8 years ago
  • G John

0

The CSS @import rule does just that. E.g.,

@import url('/css/common.css');
@import url('/css/colors.css');
  • answered 8 years ago
  • Gul Hafiz

Your Answer

    Facebook Share        
       
  • asked 9 years ago
  • viewed 2271 times
  • active 9 years ago

Best Rated Questions