How can I search for a class or id's width value (or anything else, say height, color, etc), and use that in CSS?
I am using Bootstrap, and have a container. I'd like to set the padding of another class to be the same width as the container.
I have found that via javascript console on the site itself, I can do:
var wid = $(".container").width();
which returns 750.
How do I implement that in my CSS?
.sampOutput{
border: 1px solid black;
padding-right:100%;
}
Where the padding-right would be 750.
Then I'd want to get the color of my body and set that as the border color.
How do I get the various values of a class/id's style?
Edit: I'm learning, and see Javascript (or jquery) may help, but if there are other ways, I'm open to it!