I have the following form which is made not using the standard <table>
tag but with CSS table(display:table, display:table-row, display: table-cell
). Till here no problem occurs but then I need some colspans in CSS which I am not able to apply. I used column-span
but it didn't worked!
HTML:
<div id="form">
<br/><br/>
<form id="form_container">
<span class="row">
<span class="cell"><select></select></span>
<span class="cell"><input type="text" /></span>
</span>
<span class="row">
<span class="cell"><input type="email" /></span>
</span>
<span class="row">
<span class="cell"><select></select></span>
</span>
<span class="row">
<span class="cell"><select></select></span>
</span>
<span class="row">
<span class="cell"><select></select></span>
</span>
<span class="row">
<span class="cell"><input type="text" /></span>
<span class="cell"><select></select></span>
</span>
<span class="row">
<span class="cell"><input type="checkbox" /><b>I have read the</b> <a>Terms & Conditions</a></span>
</span>
<input type="image" src="img/send_button.png" />
</form>
</div>
CSS:
#form_container {
display: table;
}
.row {
display: table-row;
}
.cell {
display: table-cell;
}
input, select {
padding: 5px;
border-radius: 5px;
}
I want the colspan on the rows which have only one cell. Is this possible with CSS or not?