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.

@import url('reset.css'); in an EE Template CSS file?

August 18, 2010 7:26am

Subscribe [2]
  • #1 / Aug 18, 2010 7:26am

    jonnyquist

    75 posts

    I currently have {embed=styles/base} in my header template to load my base CSS. Inside that, I’m importing a CSS reset, as well as a few others (clearfix and fontface). It’s not working by keeping it as @import url(‘reset.css’);—Is there a way to allow the importing of style sheets without linking to each of them in the header template?

    I searched, but couldn’t find anything on the subject. Sorry if this is a dumb question, this is my first EE website…

  • #2 / Aug 18, 2010 8:21am

    Sue Crocker

    26054 posts

    Hi, jonnyquist.

    Not a dumb question at all.

    The main thing you need to know about external files in EE is that you need to path from the root. So your import url would need to be pathed from the root. Example: /css/reset.css.

    Does that help?

  • #3 / Aug 18, 2010 8:35am

    jonnyquist

    75 posts

    Ah, okay. So “system/expressionengine/templates/default_site/styles.group/reset.css” would work?

    Do you think it’s better to use CSS as a template or just do it the traditional way and link to them normally?

  • #4 / Aug 18, 2010 8:40am

    Sue Crocker

    26054 posts

    I create a folder called jscss and call my .css files normally. But that’s just me. 😊 YMMV.

  • #5 / Aug 18, 2010 9:34am

    jonnyquist

    75 posts

    Ah, alright. Thanks. I think I’ll link to them the traditional way too.

  • #6 / Aug 18, 2010 9:46am

    Sue Crocker

    26054 posts

    Sounds good to me. 😊 Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases