Copy link to clipboard
Copied
Hello,
I have a page made in Dreamweaver, on the navbar there is text for links but for the life of me I cannot figure out how I change text colour. I could just do an inline style but surely I must be able to change it.
Thanks for any help.
http://www.victorianrailways.net/service%20stock/service%20stock%20pages/wk/wk.html
To change the color of your text in the navigation menu, you just have to add the following rule, what you already did :
.navbar-inverse .navbar-nav > li > a {
color: red
}
But however, there would be some remarks to certainly correct beforehand :
Copy link to clipboard
Copied
To change the color of your text in the navigation menu, you just have to add the following rule, what you already did :
.navbar-inverse .navbar-nav > li > a {
color: red
}
But however, there would be some remarks to certainly correct beforehand :
In conclusion, if the rule doesn't work to change the color, it's certainly because the code it contains is not interpreted, and that, just because the referent libraries are not loaded.
To verify it, just open the console (ctrl shift k) of your browser and copy and paste this following fragment
var css = '.navbar-inverse .navbar-nav > li > a {color: red;}';
var style = document.createElement('style');
if (style.styleSheet) { style.styleSheet.cssText = css;} else { style.appendChild(document.createTextNode(css));}
document.getElementsByTagName('head')[0].appendChild(style);
You will see that in plain JavaScript, without using jquery, it works, which demonstrates the loading problems related to the use of https,
First modify your requests by removing the s from https ( within the HEAD tag, for each SCRIPT and LINK tags)
Reaload you page, and it should work (of course, if you have added the rule quoted at the very beginning of this comment in your personal STYLE tag)
But then , second, think about adding a certificate to your page and use HTTPS
Copy link to clipboard
Copied
All good points but why the overkill of using javascript to append a css selector to the head section of the page just to test, surely it's far simpler just to write it directly to the head and l don't understand why css has anything to do with the Bootstrap js files, the css would be coming from the Bootstrap css file and the console errors in the uploaded image don't suggest that is coming from an external https source, maybe there are additional css links which are prefixed with https, l haven't looked at the code but even so you don't need to use javascript to test a css selector.
Copy link to clipboard
Copied
Yes, you’re right and that's exactly the rule I'm indicating at the beginning of my first comment, which should be added to the code in the STYLE tag, the one added by @gunzelguy :
.navbar-inverse .navbar-nav > li > a {
color: red
}
So not having access to the page code, in order to demonstrate it directly from the console, I had to use a plain vanilla, because jquery is not loaded by the page.
Maybe I was clumsy in explaining it... youps, I’m sorry...
Copy link to clipboard
Copied
Yes, you’re right and that's exactly the rule I'm indicating at the beginning of my first comment, which should be added to the code in the STYLE tag, the one added by @gunzelguy :
.navbar-inverse .navbar-nav > li > a {
color: red
}
So not having access to the page code, in order to demonstrate it directly from the console, I had to use a plain vanilla, because jquery is not loaded by the page.
Maybe I was clumsy in explaining it... youps, I’m sorry...
By @L e n a
Right well you've confused me because its nothing to do with js it's to do with a css file. If for any reason the css file was not being loaded as a result of mixed content there's no need to use vanilla javascript to append the style tag and selector to the page to prove it is a problem with the style sheet either not loading or a badly formed selector stopping the cascade, you could simply embed the css selector without using javascript to test for potential problems with the css file.
Ýour first bit of advice was correct, all it needed was wrapping in style tags, assuming one was performing a test and the OP would have access to the code.
Copy link to clipboard
Copied
Look at Bootstwatch Themes. There are 25 different themes available.
Simply replace current Bootstrap CSS with your desired Bootswatch Theme.
If you like red, you might like the Journal Theme.
<!--Replace Bootstrap CSS with Bootwatch Theme-->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.2.3/journal/bootstrap.min.css" rel="stylesheet">
Bootswatch Examples
Bootswatch Libraries on CDN
https://cdnjs.com/libraries/bootswatch
Hope that helps.
Copy link to clipboard
Copied
To add to what @Nancy OShea has said, this is early stage of the redevelopment of the site, why not go straight for Bootstrap v5?
Have I said that the current creation of the site is a vast improvement on the previous version?
Ben
Mount Eliza VIC
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more