Using inline-block

In this example below you will see how to do a Using inline-block with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by IamPuyih, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright IamPuyih ©
  • HTML
  • CSS
  • JavaScript
    <h2>Using inline-block</h2>

<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>
<div class="floating-box">Floating box</div>

<div class="after-box">Another box, after the floating boxes...</div>




/*Downloaded from https://www.codeseek.co/IamPuyih/using-inline-block-gPemOY */
    .floating-box {
    display: inline-block;
    width: 150px;
    height: 75px;
    margin: 30px;
    border: 3px solid #73AD21;  
    text-align: center;
 
}

.after-box {
    border: 3px solid red; 
}



/*Downloaded from https://www.codeseek.co/IamPuyih/using-inline-block-gPemOY */
    

Comments