Copied to clipboard

Flag this post as spam?

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


  • Jason 92 posts 175 karma points
    Oct 31, 2014 @ 13:09
    Jason
    0

    Losing styling with '/' at end of URL

    i.e.

    umbraco7.local/about-us renders all the html (from master template), and css etc..

    umbraco7.local/about-us/ does not render the css, but the source code is identical to the above.I do however receive a 404 error when clicking the css link in the source code for the 'about-us./' page.

    Static content is enabled in ServerManager/IIS

     

    thanks

    Jason

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 31, 2014 @ 13:57
    Jan Skovgaard
    0

    Hi Jason

    What does the reference to your CSS file look like? Are you referencing it relatively or absolutely?

    /Jan

  • Jason 92 posts 175 karma points
    Oct 31, 2014 @ 14:06
    Jason
    0

    Hi Jan, my css ref is made within the MasterTemplate.cshtml as follows, within the <head>: <link rel="stylesheet" href="css/foundation.css" />.

    My StandardContent.cshtml template inherits from MasterTemplate.cshtml, and my content pages uses the StandardContent.cshtml template.

    Thanks

    Jason

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 31, 2014 @ 14:09
    Jan Skovgaard
    100

    Hi Jason

    Ok, try changing the reference to look like this <link rel="stylesheet" href="/css/foundation.css" /> - Notice the forward slash before "css". This makes it into an absolute path.

    Hope this helps.

    /Jan

  • Jason 92 posts 175 karma points
    Oct 31, 2014 @ 14:13
    Jason
    0

    Hi Jan,

    Can't believe i missed that - a typo on my part. I've always used the '/...' approach, but never known the difference between them - so thank you.

     

    regards

    Jason

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 31, 2014 @ 14:16
    Jan Skovgaard
    0

    Hi Jason

    You're very welcome. I've done it myself a couple of times as well :D

    Remember to mark the post a solved so others who come across the same issue can easily see the answer :)

    Cheers, Jan

  • Jason 92 posts 175 karma points
    Oct 31, 2014 @ 14:22
    Jason
    0

    Silly question incoming.. how do I mark this as solved? There's no obvious control to do that (using Chrome)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 31, 2014 @ 14:24
    Jan Skovgaard
    0

    Hi Jason

    There should be an option in the line below the usernames to the right that says "Mark as solution". :)

    /Jan

  • Jason 92 posts 175 karma points
    Oct 31, 2014 @ 14:48
    Jason
    0

    I can safely say there's no option to Mark as Solution :(

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 31, 2014 @ 14:55
    Jan Skovgaard
    0

    Hi Jason

    Ah, sorry! I remembered it wrong. There is a green check mark icon below the user name to the right of the avatar.

    /Jan

  • Jason 92 posts 175 karma points
    Oct 31, 2014 @ 15:20
    Jason
    0

    Got it :)

Please Sign in or register to post replies

Write your reply to:

Draft