More in this section
Forums / Developing with Sitefinity / Relative links

Relative links

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Alex
    Alex avatar
    10 posts
    21 Nov 2007
    05 Mar 2008
    Link to this post
    Hi what is the best way to reference css links etc in master files?

    Everything works fine until I click a link to something like a page with a single news item on it. This is because the url changes to something like:


    Any ideas?


  2. Katia
    Katia avatar
    194 posts
    01 Jul 2016
    06 Mar 2008
    Link to this post
    Hello Alex,

    I suggest that you add the CSS file in the HEAD tag of the master page (for example to App_Master/Default.master) like this:

    <head runat="server">  
        <title>Untitled Page</title> 
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />   
        <link media="screen" rel="stylesheet" type="text/css" href="~/App_Themes/Blue/styles.css" runat="server" /> 

    In the href attribute of the link tag write the path to the CSS file starting from the root folder of your site starting with ~/ . Don't forget to set the value of the runat attribute to server.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered