Posted: Thu Nov 19, 2009 3:15 pm Positioning image and text within same cell w/o style sheet
Hi, k back to my 2col 3row table. I want to put a image in 1st row that is colspan across both columns.
Then i want put content(text) next to it and for that text to not only flow from top of cell next to pic but also underneath the pick 3 or 4 lines. Align is depricated, valign doesnt work, float left doesn't work. So believe I have an alignment problem, but such a simple proble has got me baffled. .
Maybe it's a position=absolute problem....don't know.
You can't stick an image and text in the same cell without some type of styling to get what you want. By default elements will align top left unless otherwise styled. Since you don't want a stylesheet the alternative is inline styling.
Code:
<td colspan="2" style="height:225px; overflow:hidden;">
<p><img src="Group20Project/movies/images/corvette.jpg" alt="red corvette" width="" height="" style="float:left; margin:0 5px 5px 0;" />This is a red 1987 Corvette.</p>
</td>
You cannot use the self closing tag (/>) on table elements ie.
Code:
<td colspan="2" style="height: 225px" />
Used in xhtml documents only using an xhtml doctype for inline tags ie.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum