help me on my html!?
why does my image on the table won't apear? can you give me a code to solve this?here is my code i need it to my computer science class
<html>
<head>
<title>first page </title>
</head>
<body>
<th>
<tl>
<table bgcolor="blue" table border = "0">
</th>
</tl>
<img src="image.gif" align="left" style="margin-right:2px; margin-bottom:2px;" />
<img src="image.gif" align="left" style="margin-right:2px; margin-bottom:2px;">
<table>
<tl> <td> <table background="U:\My pictures\Rurouni_Kenshin_manga.jpg"> </tl> </td>
<tl><td><table background="U:\My pictures\one%20Piece01000.jpg"></td></tl>
<tl><td><table background="U:\My Pictures\Naruto01016.jpg"> </td></tl>
</table>
</body>
</html>
Public Comments
- Put the <th> and <tl> tags inside the <table> tag. <td> is for a table cell, you cannot have a table cell until you create the table.
- (edited) - Okay, you have to have something IN the cells in order to see the background image. You also need to take the "table" out of the "table background" line, and make it look like: <td background="image">
- For the first table, for which you have: <th> <tl> <table bgcolor="blue" table border = "0"> </th> </tl> <img src="image.gif" align="left" style="margin-right:2px; margin-bottom:2px;" /> <img src="image.gif" align="left" style="margin-right:2px; margin-bottom:2px;"> I'd suggest this: <table bgcolor="blue" table border = "0"> <tr><td> <img src="image.gif" align="left" style="margin-right:2px; margin-bottom:2px;" /> </td> <td> <img src="image.gif" align="left" style="margin-right:2px; margin-bottom:2px;"> </td></tr> </table> I hope that helps!
- DUDE...your HTML is really messed up. The image problem is the least of your issues. Start with a clean table: <table> <tr><td>Content Goes Here</td></tr> <tr><td>Content Goes Here</td></tr> </table> The best may to apply a background image to a table cell is via CSS. Either apply it as an inline style: <table> <tr><td style="background: url(images/imagename.jpg) repeat-x #ffffff;">Content Goes Here</td></tr> </table> or assign a class or id to the cell and declare the CSS in a seperate CSS file. By the way, the CSS notation in the example is used thus: background: url("../images/bg-body.gif") repeat-x #ffffff; url is the path to the image you want to display. repeat-x means repeat horizontally, you can also use repeat-y or no-repeat. the last value is a hex code for the background color, in this case white. remember that the background image is display on top of the background colour, but below the background content.
- where you have your images in your table replace it with: <table border="0"> <tr> <td width="479" height="217"><img src="IMAGE LINK ONE" width="475" height="243" border="0"></td> <td width="479" height="217"><img src="IMAGE LINK TWO" width="300" height="150" border="0"></td> </tr> </table>
Powered by Yahoo! Answers