0

I have a modest site that I was hired to help customize with some CSS features, however I am noticing a problem.

Bootstrap has its own mini-file that tells it what to style its navigation bars with and at the moment, because of that, my nav bar text is grey. Its contrast compared what the site owner wants is very poor and so I attempted to change this to black.

However in doing so, because I am using CDN, bootstrap files seem to override my custom CSS template files. Is there a way to resolve this issue? I have searched for answers but have yet to find any, please help. Thank you.

enter image description here

enter image description here

0

Your custom css needs to be more targeted to override the default boostrap css. On line 38 replace ".navbar-nav" with the following:

.navbar-default .navbar-nav>li>a
  • I went into the file and added what you put down listed, but updated it to stylesheets, thinking you put styleshoots by mistake? But this did not seem to resolve the issue. – Shawn Jan 25 '16 at 15:29
  • Yep, meant to put "stylesheets" - thanks. Did you flush the cache? Also, how is the boostrap css being loaded? What theme is the site using? – RarelyRed Jan 25 '16 at 15:53
  • Yes I flushed the cache. I am using the bootstrap theme, and the bootstrap.css.min is being loaded via CDN. When I inspect it in firefox, it says the bootstrap.min.css is the "main" css file, while my css file is just inherited. – Shawn Jan 25 '16 at 16:11
  • Strange, I have a site that uses the Bootstrap theme and adding the css/style.css line above overrides whatever I tell it to. Is it possible that you aren't targeting the nav bar text directly enough? Is your custom css file organized in the file name and directory structure listed above? – RarelyRed Jan 25 '16 at 16:16
  • I added my code as images so you could take a better look at it. I know the CSS file works because i can change elements like the jumbo tron from white text to red text no problem. However, changing the nav-bar does not work, so i'm assuming it may be due to lack of proper targeting. How would I target it correctly? – Shawn Jan 25 '16 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.