Saturday, 7 September 2013

How to horizontally distribute inputs inside the parent?

How to horizontally distribute inputs inside the parent?

I have five select inputs and want to distribute them horizontally inside
the parent div.
This code doesn't work:
<div id="divtable">
<select class="abc"></select>
<select class="abc"></select>
<select class="abc"></select>
<select class="abc"></select>
<select class="abc"></select>
</div>
css
#divtable{
display:table;
width:100%;
table-layout:fixed;
border:thin solid red;
}
.abc{
display:table-cell;
width:17%;
margin:5px 0;
padding:3px;
border:thin solid #999;
border-radius:3px;
}
fiddle is here

No comments:

Post a Comment