Inner Width Experiment 2

by hamzeen hameem

HTML

<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>

CSS

div {
    width: calc( calc(100vw - 80px) / 7); 
    height: 50px;
    display: inline-block;
    border: 0px solid;
    background-color: red;
}

JavaScript

var itemWidth = (window.innerWidth - 80) / 7;
 console.log(itemWidth);