Forum Moderators: open

Message Too Old, No Replies

Trying to float a table to the left.

I am entering the html as instructed, but it is not working...

         

theadvocate

10:43 pm on Jan 28, 2004 (gmt 0)

10+ Year Member



Hello,

I am trying to float a small table in the upper left which holds an image in it, and have the text appear to the right of it, then wrap around underneath it as the text continues on.

However, I can't get it to work...

I asked this question once before and received the following answer:
_________________________

<table width="100" align="left">

should float a table left with text or other objects wrapping around it.
_________________________

I have added that to my HTML for the table as the following:

<table width="100" align="left">
<tr>
<td width="100%" align="left"></td>
</tr>
</table>

But it is not working.

Can someone please give me the full html and not just the beginning of the table html since I am unable to get it to work?

Thanks!

iamlost

11:29 pm on Jan 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Some extraneous bits but try:

CSS:


table {
float: left;
width: 100px;
padding: 0;
margin: 0;
border: 2px black solid;
}
td {
width: 100%;
font: bold 0.8em sans-serif;
padding: 1em;
margin: 0;
}

HTML:


<table>
<tr>
<td>Test Table</td>
</tr>
</table>

Put the html snippet within your <body> tags and should be fine. "float" is css not html and that may be the misunderstanding. If you still have a problem post snippets of your css and html code so that div interactions/conflicts can be seen in your circumstance.

DrDoc

12:13 am on Jan 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about ditching the table entirely, and just apply float:left to the image itself :)

theadvocate

1:48 am on Jan 29, 2004 (gmt 0)

10+ Year Member



Thanks Iamlost, I will give it a try and repost my html if it does not work.

Doc, I need the image in a table because there is a corresponding link in the second cell of the table underneath the image, but I will keep the suggestion for future scenarios where the table is not needed.

Thanks again for the help!