C#C
C#16mo ago
7 replies
Moonlit 👑🐶

✅ How to stop Bootstrap CSS from overriding the layout.css of my Razor page?

So I've been trying time and time again to understand why I can't get my pages to look how I want them to at all! I've tried adding a colour background to my main body of my pages but it doesn't work unless I remove the bootstrap.css, but when I do that, my page looks terrible, like a coloured notepad rather than a nice website...

I'm really struggling to understand how I'm meant to do the CSS Files..

I have the _Layout.cshtml
https://pastebin.com/Y3swt5rd

And I have the _Layout.cshtml.css
https://pastebin.com/0n5QQ9Zx

How am I meant to get the layout css to apply properly to my pages? The footer colour works and is purple... But the Header is white when it should be purple and the body is white when it should be lavander.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?