codegurukool.com · Free coding tutorials & online compiler

Home › CSS Tutorial › CSS inline-block

CSS inline-block

Inline flow with block sizing.

An inline-block sits in a line yet accepts width, height and vertical margins.

Example code

<style>.k{display:inline-block;width:80px;height:50px;background:#1b998b;margin:4px;color:#fff}</style>
<div class='k'>A</div><div class='k'>B</div><div class='k'>C</div>

Run this code in the online editor

← CSS floatCSS align →