Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon Behrens 53 posts 77 karma points
    Sep 23, 2010 @ 17:33
    Jon Behrens
    0

    Umbraco 4.5.2 Does not apply style sheet

    I have a new install of 4.5.2 using .net 3.5 on IIS 6

    My master page head looks like this:

        <head id="head" runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>
          <asp:placeholder runat="server">
            <umbraco:Item runat="server" field="pageName" /> - <umbraco:Item runat="server" field="siteName" recursive="true" />
          </asp:placeholder>
        </title>
        <link rel="stylesheet" type="/text/css" href="~/css/site.css" />
        <link rel="stylesheet" type="/text/css" href="~/css/color.css" />
          <!--Place to put page specific styles-->
        <asp:ContentPlaceHolder ID='childStyle1' runat="server"></asp:ContentPlaceHolder>
        <script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
        <script type="text/javascript" src='~/scripts/curvycorners.js'></script>
        <script type="text/javascript" src='~/scripts/document.js'></script>
          <!--Place to put page specific scripts-->
        <asp:ContentPlaceHolder ID='childScript1' runat="server"></asp:ContentPlaceHolder>
        </head>

    Firebug gives the message: Failed to load source for: http://srv/crimumbraco/css/site.css

    If I change the code to:

    <style type='text/css'>
      @include "css/site.css"
    </style>

    Then everything works fine. The problem with that is that child pages do not see the style because of path depth.

    I'm new with Umbraco and have no idea how to chase this one down. Thanks for any help.

    Jon

  • Phil 12 posts 32 karma points
    Sep 23, 2010 @ 18:02
    Phil
    0

    Try removing the tilde I don't think its needed : <link rel="stylesheet" type="/text/css" href="/css/site.css" />

  • Jon Behrens 53 posts 77 karma points
    Sep 23, 2010 @ 18:56
    Jon Behrens
    0

    Thanks, but that doesn't help. Then the Firefox error is: Failed to load source for: http://srv/css/site.css.

    In other words, it pops up to the root website.

  • Jon Behrens 53 posts 77 karma points
    Sep 23, 2010 @ 19:17
    Jon Behrens
    0

    Found it. /text/css should be text/css - don't know how that extra slash got in there.

Please Sign in or register to post replies

Write your reply to:

Draft