17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1580 Views |
-
Change order of applied CSS.

4 June 2008 at 10:16pm
Hi,
How can I change the order of my css files?
at the minute it's:
<!--[if IE 6]>
<style type="text/css">
@import url(themes/staff/css/ie6.css);
</style>
<![endif]-->
<!--[if IE 7]>
<style type="text/css">
@import url(themes/staff/css/ie7.css);
</style>
<![endif]-->
<link rel="stylesheet" type="text/css" href="themes/staff/css/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/staff/css/typography.css" />
<link rel="stylesheet" type="text/css" href="themes/staff/css/form.css" />When it should be:
typography.css
form.css
layout.css
ie7
ie6I can't see were to change it in the templates.
-
Re: Change order of applied CSS.

5 June 2008 at 10:16pm
Hello,
look into your code folder!
Then open Page.php
There you'll find smth like:class Page_Controller extends ContentController {
function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
....
Here you can change the order, or remove those commands and write it direct to the head element. -
Re: Change order of applied CSS.

5 June 2008 at 11:19pm
As KingBert pointed out some on the CSS files are loaded dynamically from the PHP where as the IE conditional comment files are loading from the template. Requirements() the method you call to add css files automagically inserts the links at the end of the <head> section. Someone in the forum has come up with a script to include ie stylessheets from the PHP - see http://www.silverstripe.com/site-builders-forum/flat/58061#post60072
| 1580 Views | ||
|
Page:
1
|
Go to Top |


