Html, table, img & css - how to get text to wrap correctly?
Posted
by Michael Pasqualone
on Stack Overflow
See other posts from Stack Overflow
or by Michael Pasqualone
Published on 2010-06-08T09:31:58Z
Indexed on
2010/06/08
9:42 UTC
Read the original article
Hit count: 181
I've got the following code; however it's not given me the desired result - what I am after is as per the image below, what am I doing wrong?
<style>
table.control_grid tr {
text-align: center;
width: 200px;
}
table.control_grid td {
width: 120px;
height: 48px;
}
table.control_grid a {
text-decoration: none;
}
table.control_grid img {
vertical-align: text-top;
}
</style>
<table class="control_grid">
<tr>
<td><img width="48" height="48" src="icon1.gif">My text & stuff, overflow??</td>
<td><img width="48" height="48" src="icon1.gif">Icon1</td>
<td><img width="48" height="48" src="icon1.gif">Icon2</td>
<td></td>
<td></td>
</tr>
</table>
Desired result:
© Stack Overflow or respective owner