Reputation: 4331
Here is my code:
<div>
<table>
<tr><td>
<img ...>
</td></tr>
<tr><td>
<p style="text-overflow: ellipsis;white-space: nowrap;">HERE MAY BE SONE VERY LONG TEST!!!</p>
</td></tr>
</table>
</div>
I want the width of my div as wide as my image, but since I don't know how wide my image is, I can't specify a width for the p to keep it in bounds.
I am looking for an html(+css) only solution, if there is any. I know how I could accomplish this in js, but that gets messy since the image size is changed over time.
Is there a way to do this in pure html/css?
Upvotes: 1
Views: 246