 <p>You can some changes in your css</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.tablep{ float:left; width:20%; } .bg{ background-color:grey; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;div class="tablep bg"&gt;Code #&lt;/div&gt;&lt;div class="tablep bg"&gt;Product Name&lt;/div&gt;&lt;div class="tablep bg"&gt;Date&lt;/div&gt;&lt;div class="tablep bg"&gt;Amount&lt;/div&gt;&lt;br&gt; &lt;div class="tablep"&gt;Id1&lt;/div&gt;&lt;div class="tablep"&gt;product1&lt;/div&gt;&lt;div class="tablep"&gt;2015&lt;/div&gt;&lt;div class="tablep"&gt;100USD&lt;/div&gt;</code></pre> </div> </div> </p>