PDA

Click to See Complete Forum and Search --> : text, image on same line in TD


mendhak
Jun 10th, 2002, 12:30 AM
help me out here, will ya?


<TABLE>
<TR>
<TD>Text, blah blah blah<IMG align="right" src="button.gif"></TD></TR>
</TABLE>



When I do this, the image falls over to the second line. I'd like to get the text and image to align on the SAME line.

Dunno what's wrong with me today. Maybe u can help. :(

progressive
Jun 10th, 2002, 03:26 AM
not to 100% on this but i think it's

<TD>Text, blah blah blah<IMG align="right" src="button.gif" style="float: right"></TD></TR>

mendhak
Jun 10th, 2002, 05:51 AM
no :(

progressive
Jun 10th, 2002, 06:02 AM
try this


<TD><IMG src="button.gif" style="float: right">Text, blah blah blah</TD>


The image needs to be in front of the text in your code.
This allows you to get this effect

text text text --------------
text text text | Image |
text text text --------------
text text text text text text
text text text text text text

mendhak
Jun 10th, 2002, 12:15 PM
You just earned yourself a cookie! Thanks!

Rick Bull
Jun 10th, 2002, 01:23 PM
Also I think you should be able to add

style="white-space:nowrap;"

to stop line breaks. I've found that if the browser size is too small float makes either the text or image break down a line.