JSFiddle - React, Tailwind, and code Playground
HTML
<div class="button_holder">
<input type="button" class="proceed" value="Go Forward" />
</div>
<div class="button_holder">
<input type="button" class="proceed" value="Long Teeeext Value" />
</div>
<div class="button_holder">
<input type="button" class="proceed" value="Go Back" />
</div>
CSS
.button_holder {
background: #eee;
position: relative;
padding: 3px;
margin: auto;
border: 1px solid #fff;
}
.proceed {
background: #fff;
border: none;
display: block;
padding: 8px 16px;
font: 9pt Georgia, "Times New Roman", Times, serif;
font-weight: 600;
color: #555;
text-align: center;
text-transform: uppercase;
text-shadow: 0px 1px 1px rgba(255, 255, 255, .3);
cursor: pointer;
border: 4px solid #ccc;
-webkit-box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}
JavaScript
$('.button_holder .proceed').each(function() {
console.log(parseInt($(this).outerWidth()));
});