Reputation:
Curious if this is still possible -- 3 divs aligned side by side horizontally, one on the left one in the middle and one on the right.
Possible to structure this for this to occur naturally without the use of CSS?
Upvotes: 2
Views: 155
Reputation: 39807
Yes, this is possible:
<table>
<tr>
<td>
<div>div 1</div>
</td>
<td>
<div>div 2</div>
</td>
<td>
<div>div 3</div>
</td>
</tr>
</table>
Upvotes: 0
Reputation: 49
You could try a <span>
instead of div. I think those default to display:inline-block.
Upvotes: 0
Reputation: 3356
No. The default display value for <div>
is display: block
. Elements with block display cannot appear on the same line.
Upvotes: 1
Reputation: 1425
Not really doable without CSS. The easiest way to handle a scenario is to wrap the three divs in a container, then use display: inline-block
on the three divs.
Upvotes: 0