JSFiddle - React, Tailwind, and code Playground

by neal_fletcher

HTML

<div class="fullscreen-wrap">
    <div class="finance-grid-wrap">
        
        <div class="finance-top-lines-wrap">
            <div class="top-line"></div>
            <div class="bottom-line"></div>
        </div>
        
        <div class="finance-grid">
        
            <div class="finance-grid-block" style="width: -moz-calc(20% - 1px); width: -webkit-calc(20% - 1px); width: -o-calc(20% - 1px); width: calc(20% - 1px);">
                <div class="finance-info">
                    <span>
                        <div class="text small">2. Net Trading</div>
                        <div class="text large">£24,600,000</div>
                    </span>
                </div>
                <div class="number">1</div>
            </div>

            <div class="finance-grid-block" style="width: -moz-calc(67% - 1px); width: -webkit-calc(67% - 1px); width: -o-calc(67% - 1px); width: calc(67% - 1px);">
                <div class="finance-info">
                    <span>
                        <div class="text small">2. Net Trading</div>
                        <div class="text large">£24,600,000</div>
                    </span>
                </div>
                <div class="number">2</div>
            </div>

            <div class="finance-grid-block" style="width: -moz-calc(9% - 1px); width: -webkit-calc(9% - 1px); width: -o-calc(9% - 1px); width: calc(9% - 1px);">
                <div class="finance-info">
                    <span>
                        <div class="text small">2. Net Trading</div>
                        <div class="text large">£24,600,000</div>
                    </span>
                </div>
                <div class="number">3</div>
            </div>

            <div class="finance-grid-block" style="width: -moz-calc(3% - 1px); width: -webkit-calc(3% - 1px); width: -o-calc(3% - 1px); width: calc(3% - 1px);">
                <div class="finance-info">
                    <span>
                        <div class="text...

CSS

/*
RESETS ------------------------
*/ 

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {margin: 0;padding: 0;border: 0;outline: 0;font-size: 100%;vertical-align: ;background: transparent;}

/*
RESETS END --------------------
*/

.fullscreen-wrap {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    background-color: #00a689;
}

.finance-grid-wrap {
    position: relative;
    width: 100%; max-width: 650px;
    height: auto;
    margin: 0 auto;
}

.finance-grid-wrap .finance-top-lines-wrap {
    position: relative;
    width: 100%; height: 60px;
    margin-bottom: 10px;
}

.finance-grid-wrap .finance-top-lines-wrap .top-line {
    position: relative;
    width: 1px; height: 30px;
    background-color: #ffffff;
    margin: 0 auto;
}

.finance-grid-wrap .finance-top-lines-wrap .bottom-line {
    position: relative;
    width: 100%; height: 30px;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
    margin: 0 auto;
}

.finance-grid {
    position: relative;
    width: 100%; height: 170px;
    height: 170px;
    margin: 0 auto;
    font-size: 0;
}

.finance-grid-wrap .finance-grid-block {
    position: relative;
    display: inline-block;
    height: 170px;
    background-color: #8ccab9;
    margin-right: 1px;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.finance-grid-wrap .finance-grid-block.active {
    background-color: #ffffff;
}

.finance-grid-wrap .finance-grid-block .number {
    position: absolute;
	top: 50%; left: 50%;
    margin-right: -50%;
	-ms-transform:...

JavaScript

//Nav Overlay Menu Click and Scroll Functions

	$(document).ready(function () {
	
	    $(".finance-grid-block").click(function () {
		    
			$(".finance-grid-block").removeClass('active');
            $(this).addClass('active');
	        
	    });
	    
	});