I have been using a custom CSS file along with bootstrap. Initially, I had my custom CSS written before the Bootstrap CSS. However, I recently discovered that it's recommended to include Bootstrap CSS first before any custom CSS. As a result, I'm facing rendering issues, especially with elements like font sizes and colors, particularly with Bootstrap's sidenav class which I have customized in my CSS file.
<link rel="stylesheet" href="/template/style.css">
Bootstrap CSS
With the above setup, my webpage is loading as desired so far. The hover effects defined in my CSS are working correctly. But when I try to modify other styles, they seem to have no effect.
Bootstrap CSS
<link rel="stylesheet" href="/template/style.css">
In this scenario, my webpage loads with my custom styling, but the font size appears different, although the colors for sidenav remain the same as in the previous case (based on my custom CSS). The hover effects defined in my CSS still work properly.
However, if I switch to the correct href link, for instance,
<link rel="stylesheet" href="/website/template/style.css">
, the colors for my sidenav change, losing the customizations, while the font size follows my CSS. Unfortunately, the hover effects in my CSS no longer function properly.
What could be causing this issue?