I'm having problems trying to access properties within an element...
when the element is set up like this:
I am able to access the style properties no problem at all e.g.
how can I access those same properties if the style is defined by a class e.g.:
?
thanks.
when the element is set up like this:
Code:
<span id="bla" style="color: white; border: 1px solid black">blablabla</span>
I am able to access the style properties no problem at all e.g.
Code:
alert(document.getElementById("bla").style.border);
how can I access those same properties if the style is defined by a class e.g.:
Code:
<style>
.button {
color: white;
border: 1px solid black;
}
</style>
<span id="bla" class="button">blablal</span>
?
thanks.