Images in HTML table row
This has been driving me mad and it's probably the silliest mistake ever!
Basically all I want is each picture to have a small box underneath with their name. I want 4 pictures, all in a row.
Unfortunately this is what happens in IE:
I'm so sorry that this looks extremely messy! Any help MUCH appreciated!
<table style="background-color:#FFFFFF" width="100%" border-collapse:collapse>
{section name=signups_loop loop=$signups max=4}
<a href='{$url->url_create("profile",$signups[signups_loop]->user_info.user_username)}'><img src='{$signups[signups_loop]->user_photo("./images/nophoto.gif")}' width='169' height='172' border='0' vertical-align=bottom></a>开发者_开发知识库;
{cycle name="startrow" values="<tr>,,,,"}
<td width=201>
<div style="background-color:#809DFF; height: 25px; width: 169px; margin-top: -15px>
<font size="1" face="Tahoma" color="black"><b><div id="feat3">
<a href='{$url->url_create("profile",$signups[signups_loop]->user_info.user_username)}'><font color="white" face="Tahoma">{$signups[signups_loop]->user_displayname|truncate:15:"...":true}</font></a></b><br></font></font></div>
</td>
{cycle name="endrow" values=",,,,</tr>"}
{/section}</table>
You can try placing the relevant text with the image, inside a container - with a floating left value.
e.g. (bare in mind I did not test this, but hopefully it helps)
<table style="background-color:#FFFFFF" width="100%" border-collapse:collapse>
<tr>
<td>
{section name=signups_loop loop=$signups max=4}
<div class="imageItemWithTextContainer" style="width:169px; float:left; "> <!-- CONTAINER START -->
<a href='{$url->url_create("profile",$signups[signups_loop]->user_info.user_username)}'><img src='{$signups[signups_loop]->user_photo("./images/nophoto.gif")}' width='169' height='172' border='0' vertical-align=bottom></a>
<div style="background-color:#809DFF; height: 25px; width: 169px; margin-top: -15px>
<font size="1" face="Tahoma" color="black"><b><div id="feat3">
<a href='{$url->url_create("profile",$signups[signups_loop]->user_info.user_username)}'><font color="white" face="Tahoma">{$signups[signups_loop]->user_displayname|truncate:15:"...":true}</font></a></b><br></font></font></div>
</div> <!-- CONTAINER END -->
{/section}
</td>
</tr>
</table>
精彩评论