Design and CSS styles
Version 7.x > Design and CSS styles > Adding External Stylesheets to Page template Header View modes: 
User avatar
Member
Member
christine - 11/8/2012 2:03:24 PM
   
Adding External Stylesheets to Page template Header
Hello,

I am having some trouble adding an external css file to a page template header.

I have tried adding
<link type="text/css" rel="Stylesheet" href="~/_SalesPad/Stylesheets/_HomeMini.css" />

to the Site Manager > Developement > Page Templates > My Template > Header in the add HEAD element container.

The css is not being applied to that page though, and I cannot figure out why.

Any help would be greatly appreciated!

- Christine

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/12/2012 7:24:29 AM
   
RE:Adding External Stylesheets to Page template Header
Check your href link. The ~ is only recognized in server controls. Try changing it to "_SalesPad/Stylesheets/_HomeMini.css". Also restart IIS or clear the cache within the application.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 11/13/2012 4:20:53 AM
   
RE:Adding External Stylesheets to Page template Header
Hello Christine,

You should be also able to add CSS right to the Master Page via CMSDesk -> Root page -> Master page tab -> Add your line to the field between the <head></head> section.

As was said... always clear the server and also the browser cache when you are modyfing CSS files.

Best regards,
Martin Danko

User avatar
Member
Member
christine - 11/26/2012 1:49:51 PM
   
RE:Adding External Stylesheets to Page template Header
Thanks for the help, unfortunately it still would not work for me to add the css that way. I ended up using the css webpart though, so all is good.

Thank you again for the help!