We have an input
element besides two buttons inside a div
, which is inside of a td
. I don't quite understand, how to put all children of the div in one line, when its parent (the td
) has a width.
Here is an example.
I could set the width of the input element to 65% e.g., but this is a hack only.
Does someone know, why the input elements takes all the width if the table cell has a width-attribute? I did not find any hint in the spec.
How can I set the input element (display
) inline nonetheless? display: flex
for the div (like it has been suggested for this)?
Survival Kit
HTML
<p>Input takes all width?</p>
<table>
<tbody>
<tr>
<td width="163px">
<div>
<input type="text" name="some-field" />
<button class="symbol" type="button"></button>
<button class="symbol" type="button"></button>
</div>
</td>
</tr>
</tbody>
</table>
CSS
button.symbol {
border-width: 0;
background: white;
display: inline;
}
button.symbol::before {
content: '\0394';
}
input {
display: inline;
}