1

I am trying to add custom css to my razor view. The route is working as i can see the html that is in the file, but when i try to add custom css it does not work.

I already tried the following code inside my Overview.cshtml, which is a view of my custom feature in sitecore:

<head>
    <meta name="viewport" content="width=device-width" />
    <title>Overview Rules</title>
    <link href="~/Style/ExternalProfiling.css" rel="stylesheet" />
    @RenderAssetsService.Current.RenderStyles()
</head>

Both are options inside the habitat solution, but both seem not to work. My file structure is as following:

My code

The actual result is that there is no stylesheet linked to the cshtml file because i think it is overridden. I would like to know where i should place my css or maybe sass to make styling on my custom created view in the feature model to work.

CryptoFool
  • 21,719
  • 5
  • 26
  • 44
Antiwoutertje
  • 139
  • 1
  • 2
  • 8
  • Please add actual code and not a picture of code - see https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question – Pete Apr 18 '19 at 08:38

0 Answers0