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