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.
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.
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
Hi Jason
What does the reference to your CSS file look like? Are you referencing it relatively or absolutely?
/Jan
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
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
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
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
Silly question incoming.. how do I mark this as solved? There's no obvious control to do that (using Chrome)
Hi Jason
There should be an option in the line below the usernames to the right that says "Mark as solution". :)
/Jan
I can safely say there's no option to Mark as Solution :(
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
Got it :)
is working on a reply...