JSFiddle - React, Tailwind, and code Playground
HTML
<div class="dm3">
DM3
</div>
<div class="dm1">
DM1
</div>
CSS
.dm3 {
width: 200px;
background: blue;
}
.dm1 {
background: green;
width: 100px;
}
@media only screen and (max-width: 400px) {
.dm3 {
width: 400px;
}
}
JavaScript
$(window).on('load resize', function() { // On load or window resize
var dm3Width = $('.dm3').width() // Get dm3 width
$('.dm1').width(dm3Width); // Make dm1 width match dm3 width
});