How to add custom css to a view in a custom created feature model in Sitecore Habitat?

152 views Asked by At

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.

0

There are 0 answers