JSFiddle - React, Tailwind, and code Playground

by sushanth009

HTML

<div class="floatcontainer doc_header" >

<img id="img1" class=".logo-image"  src="http://lorempixel.com/100/100/"/> 
    
    </div>

CSS

.floatcontainer
{
    width: 90%;
    height: 200px;
    background-color: orange;
}

JavaScript

var newWidth = $('.floatcontainer.doc_header').width();
alert(newWidth)
    $('.\\.logo-image').css({'width' :newWidth, display : 'block'});