Design and CSS styles
Version 7.x > Design and CSS styles > sequence of theme stylesheets View modes: 
User avatar
Member
Member
pavel.1991-tut - 4/3/2013 7:00:12 AM
   
sequence of theme stylesheets
I added some css stylesheets to the theme folder of main css stylesheet. These stylesheets have names "dropdown.css" and 'common.css". I need that "common.css" be loaded higher in html than "dropdown.css', becouse of css cascade. But kentico loads first "dropdown.css", then "common.css". How can I choose what will be loaded first(higher in html)?

User avatar
Kentico Support
Kentico Support
kentico_janh - 4/3/2013 8:57:28 AM
   
RE:sequence of theme stylesheets
Hello,

These stylesheets are rendered alphabetically so the common.css should be loaded higher than dropdown.css one. Could you please copy the source output HTML markup here? Just that part where those styles are linked.

Best regards,
Jan Hermann

User avatar
Member
Member
pavel.1991-tut - 4/3/2013 10:03:29 AM
   
RE:sequence of theme stylesheets
It means that there is only one way to render any stylesheet higher. It is to add prefix to a stylesheet? For example, "a_dropdown.css"?

User avatar
Kentico Support
Kentico Support
kentico_janh - 4/3/2013 2:38:19 PM
   
RE:sequence of theme stylesheets
Hello,

No, there are other options how to do that, however the one you have mentioned lists stylesheets alphabetically.

You can for example select your root document in your content tree, switch to the Mater page tab and add any stylesheet you want in an order you want by adding their markup directly to the head section:

<link href="~/CMSPages/GetResource.ashx?stylesheetname=FirstStyle" type="text/css" rel="stylesheet" />
<link href="~/CMSPages/GetResource.ashx?stylesheetname=SecondStyle" type="text/css" rel="stylesheet" />


Best regards,
Jan Hermann