JSFiddle - React, Tailwind, and code Playground
by Geler
HTML
<div id="test1"></div>
<div id="testtrue"></div>
<span id="testhtml"></span>
CSS
div {
width:10px;
height:10px;
}
#test1 {
background:red;
}
#testtrue {
background:blue;
}
JavaScript
$("#testhtml").html(
$("#test1").outerWidth(1)+" "+$("#testtrue").outerWidth(true)
);