ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Can't link my CSS with my template file while using "@import" method

February 06, 2011 3:24pm

Subscribe [2]
  • #1 / Feb 06, 2011 3:24pm

    Zlate

    75 posts

    In my template file I’m linking my EE page with the “base.css” with this method:

    <link rel="stylesheet" type="text/css" href="{stylesheet=site/base}" />

    However in the base.css I’m using the import method to import some more css files like this:

    @import url("layout.css");
    @import url("typography.css");
    @import url("forms.css");

    So the problem is that only base.css is applied, while the remaining aren’t. I know I can do this separately for the four css using the {stylesheet=site/css-file} method, but just for the sake of keeping my development methodology I wanted to keep the “@import” method. I guess the problem might be finding the correct path or something?

    For the reference: I’m using flat files turned on, so all of the CSS are created in the same folder.

  • #2 / Feb 07, 2011 9:31am

    Sue Crocker

    26054 posts

    Hi, Braveheart. You’ll need to put in a path from the root. So if your .css files are in the root, your import would be:

    @import url("/layout.css");

    Does that help?

  • #3 / Feb 08, 2011 7:44am

    Zlate

    75 posts

    I tried that even at the beginning, but it didn’t worked. Never mind, it’s not a big issue anyway. I’m basically developing my site locally with WAMP, so I guess when I put it on my server online, things will change as the site will be in a root folder.

  • #4 / Feb 08, 2011 3:42pm

    Sue Crocker

    26054 posts

    You may still have the same issue. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases