JSFiddle - React, Tailwind, and code Playground

by timmyll

HTML

<div class="row">
    <div class="col-4"></div>
    <div class="col-2">
        <div class="grow1"></div>
    </div>
    <div class="col-2">
        <div class="grow2"></div>
    </div>
    <div class="col-4"></div>

CSS

* {
    box-sizing: border-box;
}
.row:after {
    content: "";
    clear: both;
    display: block;
}

[class*="col-"] {
    float: left;
    padding: 15px;
}
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}

.grow1{
	background: red;
	background-size: contain;
	background-repeat: no-repeat;
	width: 100px;
	height: 50px;
	-webkit-transition: width 1s, height 1s; 
	transition: width 1s, height 1s;
	z-index: 1;
	}
.grow1:hover{
	background-size: contain;
	width:150px;
	height:70px;
	z-index: 2;
}
.grow2{
	background: green;
	background-size: contain;
	background-repeat: no-repeat;
	width: 100px;
	height: 50px;
	-webkit-transition: width 1s, height 1s; 
	transition: width 1s, height 1s;
	z-index: 1;
	}
.grow2:hover{
	background-size: contain;
	width:150px;
	height:70px;
	z-index: 2;
}