I have a table where each cell contains a text input. Next to the text input I have a span. I'd like this span to sit over the text input right hand side as a label.
The HTML structure for each cell is simply:
<td>
<div>
<input type="text" />
<span>A</span>
</div>
</td>
If I leave no white space between the input and span, it actually works how I'd like, but I'd rather not have to make a massive long line in my HTML (table 3 in the jsfiddle).
I added a line break, which obviously went badly (table 2) as the span then goes onto the next line.
I figured I could fix this by applying nowrap to the div, but that also went badly (table 1) as for some reason I don't understand the table cell sizes are no longer correct.
My questions are: why is this happening, and what would be the best way to fix it?