Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table and HTML

Status
Not open for further replies.

samesale

Programmer
Sep 15, 2003
133
US
I am trying to create a table where I can show a picture (gif) and text in many lines without borders. I wrote the following HTML, but it does not work.

<html>
<head></head>
<body>
<table WIDTH =&quot;100%&quot; BORDER=&quot;0&quot; >
<tr bgcolor=&quot;red&quot;><th></th><th>Year</th><th> Make</th><th> Model</th><th>Color</th><th>Miles</th><th>Price</th><th>E-Mail</th><th>Telephone</th><th>Time-to-Call</th></tr>
<tr><td><img src=&quot;images/$tele.jpg&quot; width=&quot;100&quot; height=&quot;100&quot; align=&quot;left&quot; vpace=&quot;10&quot; hspace=&quot;15&quot;></td></tr>
<tr align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#FF99FF&quot;>
<td></td><td>eyear</td><td> <font color=&quot;blue&quot;> make </font></td> <td>model</td> <td> color</td> <td>mile</td> <td>price</td><td><a href=&quot;mailto: $email&quot; >email </a></td> <td> tele</td> <td> time</td>
<BR><BR><td></td><td> eyear</td><td> <font color=&quot;blue&quot;> make </font></td> <td>model<td> color<td>mile </td><td>price</td><td><a href=&quot;mailto: $email&quot;>email </a></td><td> tele</td><td> time</td></tr>
</table>
</body>
</html>

Any help will be appreciated.
 
[tt]
<html>
<head></head>
<body>
<table WIDTH =&quot;100%&quot; BORDER=&quot;0&quot; >
<tr bgcolor=&quot;red&quot;><th></th><th>Year</th><th> Make</th><th> Model</th><th>Color</th><th>Miles</th><th>Price</th><th>E-Mail</th><th>Telephone</th><th>Time-to-Call</th></tr>
<tr><td><img src=&quot;images/$tele.jpg&quot; width=&quot;100&quot; height=&quot;100&quot; align=&quot;left&quot; vpace=&quot;10&quot; hspace=&quot;15&quot;></td></tr>
<tr align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#FF99FF&quot;>
<td></td><td>eyear</td><td> <font color=&quot;blue&quot;> make </font></td> <td>model</td> <td> color</td> <td>mile</td> <td>price</td><td><a href=&quot;mailto: $email&quot; >email </a></td> <td> tele</td> <td> time</td>
<BR><BR></tr><tr><td></td><td> eyear</td><td> <font color=&quot;blue&quot;> make </font></td> <td>model<td> color<td>mile </td><td>price</td><td><a href=&quot;mailto: $email&quot;>email </a></td><td> tele</td><td> time</td></tr>
</table>
</body>
</html>
[/tt]

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Are you trying to get the picture to appear in the leftmost column and the data to appear in rows to the right of it? If so, you need to use the [tt]colspan[/tt] attribute. Something like this (rearranged for legibility):
[tt]
<html>
<head></head>
<body>
<table WIDTH =&quot;100%&quot; BORDER=&quot;0&quot; >
<tr bgcolor=&quot;red&quot;>
<th></th>
<th>Year</th>
<th>Make</th>
<th>Model</th>
<th>Color</th>
<th>Miles</th>
<th>Price</th>
<th>E-Mail</th>
<th>Telephone</th>
<th>Time-to-Call</th>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#FF99FF&quot;>
<td rowspan=&quot;2&quot;>
<img src=&quot;images/$tele.jpg&quot; width=&quot;100&quot; height=&quot;100&quot; align=&quot;left&quot; vspace=&quot;10&quot; hspace=&quot;15&quot;>
</td>
<td>eyear</td>
<td><font color=&quot;blue&quot;> make </font></td>
<td>model</td>
<td>color</td>
<td>mile</td>
<td>price</td>
<td><a href=&quot;mailto: $email&quot; >email </a></td>
<td>tele</td>
<td> time</td>
</tr>
<tr align=&quot;left&quot; valign=&quot;top&quot; bgcolor=&quot;#FF99FF&quot;>
<td>eyear</td>
<td><font color=&quot;blue&quot;>make</font></td>
<td>model</td>
<td>color</td>
<td>mile</td>
<td>price</td>
<td><a href=&quot;mailto: $email&quot; >email</a></td>
<td>tele</td>
<td> time</td>
</tr>
</table>
</body>
</html>
[/tt]
Incidentally, I stringly advise you to use CSS for foreground/background colours rather than <font>, bgcolor, etc.

-- Chris Hunt
 
Thank you very much for your good suggestion. It answered my question. I would like your help in reducing the sign space between the picture and the first border.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top