hi all,
i just installed ee and have started the learning curve.
all seems to be going well enough so far, apart from a stylesheet related issue i’m having:
outside of ee, i usually call my style sheets using the following code:
<link rel="stylesheet" href="css/basic.css" type="text/css" />
<style type="text/css">@import url("css/import_styles.css");</style>
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="css/screen_ie.css" />
<![endif]-->
where the ‘basic.css’ file is loaded and if the browser understands @import it will load the file ‘import_styles.css’ which would contain (for example):
@import url("reset.css");
@import url("screen.css");
@import url("sifr.css");
@import url("sifr_print") print;
so while translating my methods to ee, i set up a template group called ‘css_group’ to contain my css, and i set all the template types to css. i then called the css as follows:
<link rel="stylesheet" href="{stylesheet=css_group/basic.css}" type="text/css" />
<style type="text/css">@import url("{stylesheet=css_group/import_styles.css}");</style>
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="{stylesheet=css_group/screen_ie.css}" />
<![endif]-->
and my ‘import_styles.css’ now looks like this:
@import url("{stylesheet=css_group/reset.css}");
@import url("{stylesheet=css_group/screen.css}");
@import url("{stylesheet=css_group/sifr.css}");
@import url("{stylesheet=css_group/sifr_print.css}") print;
when i set up my files as above, the css files inside the ‘import_styles.css’ don’t get imported and therefore don’t get applied to the page
QUESTION 1: what is the correct path/method to call the other css files in the ‘import_styles.css’ file?
after not getting the above to work, i then just listed the @imports in the head instead of using the ‘import_styles’ file:
<link rel="stylesheet" href="{stylesheet=css_group/basic.css}" type="text/css" />
<style type="text/css">@import url("{stylesheet=css_group/reset.css}");</style>
<style type="text/css">@import url("{stylesheet=css_group/screen.css}");</style>
<style type="text/css">@import url("{stylesheet=css_group/sifr.css}");</style>
<style type="text/css">@import url("{stylesheet=css_group/sifr_print.css}") print;</style>
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="{stylesheet=css_group/screen_ie.css}" />
<![endif]-->
this worked and the css was applied to the page, however my css editor of choice (cssedit on the mac) would then only detect and allow me to edit the first 2 stylesheets (basic.css and reset.css) - i’m not sure why, it could just be a limitation of cssedit?
QUESTION 2: why is cssedit not recognising the files after ‘reset.css’ is there a better way to import the styles to have them recognised by cssedit?
i have resorted to just not having the css within ee, and linking to it as i used to (mentioned at the beginning of the post.).
QUESTION 3: what are the advantages of keeping the css within ee? having thought about i am struggling to think of any?
anyway, thanks for listening, i hope i havn’t made this sound more complicated than it is!
mat
