No replies
KateYoak
KateYoak's picture
Offline
newbie
Last seen: 9 years 23 hours ago
Timezone: GMT-8
Joined: 2011-02-23
Posts: 1
Points: 2

I run into this type of a problem a lot. Without specifying the width, I'd like to force my divs to stay side-by-side as table columns would.

The behavior I am looking for would be accomplished by this:

<table>
<tr><td>Text</td><td>Long paragraph of text that will wrap and could extend to 100% of the width if you were not in a table</td></tr>
</table>

What i am doing is this:

<div style="float: left">
Text
</div>
<div style="float: left">
Long paragraph of text that will wrap and could extend to 100% of the width if you were not in a table
</div>

This is useful for, say, displaying a conversation:

Kate>> Said all these things, which when wrap should show up under text
______ and not under Kate

Thank you for the help!
Kate