So I am trying to retrieve a CSS property from the DOM and the only thing being returned is ""...
e.g. if my CSS code is
nav {
color: red;
}
and my javascript is
var nav = document.querySelector("nav");
var navColor = nav.style.color;
console.log(navColor);
All that is returned to console is "". I am new to JS.
If I try to manually make a var and find it's property in the console, it also outputs "", until I change the value of the style property, then it successfully returns the properties value - yes I have definitely set a property I am trying to retrieve and I have checked spelling hundreds of times.