I am using WordPress with WPBakery Web Builder.
I am trying to capture a CSS attribute("font-size") of a specific element in the screen. In order to capture the element and its attribute I am using JavaScript.
I am running the following script:
var v = document.getElementsByClassName("cb-img-area");
v[0].style.fontSize;
and the output is "", even though this is the class's CSS -
.cb-img-area {
font-size: 72px;
margin-bottom: 25px;
margin-right: 0;
float: left;
width: 100%;
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
How can I get the class's font-size attribute?
Thank you