Trying to dynamically adjust the innermost element's width to match the outermost element's width with Vue:
<div id="banner-container" class="row">
<div class="col-xs-12">
<div class="card mb-2">
<div class="banner banner-tag card-body" :style="getBannerStyle"></div>
</div>
</div>
</div>
Here is the relevant Javascript code and Vue computed property logic:
var container = document.getElementById('banner-container').offsetWidth;
...
computed: {
getBannerStyle () {
return 'width: ' + container + 'px;';
}
}