Forum Moderators: not2easy

Message Too Old, No Replies

Span float but want it on top

Trying to get an image toward the top

         

Clark

6:10 pm on Mar 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm so not good at CSS it isn't even funny. Here's my code:

<table cellpadding="2" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td>
<div>
<img src="images/someimage.gif" border="0" />
<span style="float:right">
<img src='images/anotherimage.gif'>
</span>
<a href="aurl.html" target="_blank"><img src="images/someimage.gif></a>
<a href="aurl.html" target="_blank">A really really really really reallyreally really really really really really really really really really long line</a>
</div>
<div>
<span class="someclass">stuff stuff and more stuff</span>
<br>
and more stuff
</div>
</td>
</tr>
</table>

The problem is that this image:
<img src='images/anotherimage.gif'>

Although floating right, is showing up lower on the page messing up the layout. What I want is to have that image on the top right of the <td> with the really really really really....long line to wrap to the next line when it hits the image, rather than pushing the image down, which it seems to do even on lines that are not really long. Hopefully my question makes sense.

MWpro

6:22 pm on Mar 26, 2005 (gmt 0)

10+ Year Member



I think only block elements can be floated. Span is an inline element.