My img tag bumps the rest of the data out

windows

Guest
Ok. I have a table, then a table in that. In in the table in that I have this code, which includes another table.<br />
<br />
<table width="750" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td width="150" height="100" valign="top" align="center"><br />
Navigation<br />
</td><br />
<td height="100" width="250" valign="top" class="latest"><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/border.gif"><br />
<table cellpadding="0" border="0" cellspacing="0"><br />
<tr><br />
<td height="10"><br />
Latest Mixes<br />
</td><br />
</tr><br />
<tr><br />
<td height="90" width="67><br />
Anime:<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"><br />
</td><br />
<td height="90 width="67><br />
VG:<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"><br />
</td><br />
<td height="90 width="67><br />
Original<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"><br />
</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
<br />
<br />
What's happening though, is that in the first table. I have the <td> code, in that <td> I have a table which has the Latest Mixes part. The problem is that the latest mixes part doesn't go inside the <td> part that the table is in. It comes outside of it. How would I get it in?<br />
<br />
<br />
I'll try and simplify.<br />
<br />
<table><br />
<td><br />
<table><br />
<td><br />
latest mixes<br />
</td><br />
</table><br />
</td><br />
</table><br />
<br />
This appears as so:<br />
<br />
code : <table> <td> <br />
--------------------<br />
Whatever is in this <td> tag appears in this box.<br />
--------------------<br />
code : <table> <td><br />
But whatever is in this <td> appears outside the box.<br />
<br />
I want it like this<br />
code : <table> <td><br />
-------------------<br />
box<br />
<table> <td><br />
box<br />
</td><br />
</table><br />
-------------------<br />
</td><br />
</table><br />
<br />
<br />
What is my problem?<!--content-->Two things... you need to colspan the first TD of the second table. You must have the same amount of Cols through out an individual table or use colspan to merge them.<br />
<br />
Secondly always close your TD's on the same line they start.<br />
<br />
Try this out:<br />
<table width="750" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td width="150" height="100" valign="top" align="center">Navigation</td><br />
<td height="100" width="250" valign="top" class="latest"><img src=http://www.htmlforums.com/archive/index.php/"images/border.gif"><br />
<table cellpadding="0" border="0" cellspacing="0"><br />
<tr><br />
<td colspan="3" height="10">Latest Mixes</td><br />
</tr><br />
<tr><br />
<td height="90" width="67>Anime:<br><img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"></td><br />
<td height="90 width="67>VG:<br><img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"></td><br />
<td height="90 width="67>Original<br><img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"></td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><!--content-->That didn't do it :\<br />
<br />
I'll give you the full code for the page, I changed a couple things to get it to work better. And <td> tags don't have to closed on the same line...<br />
<br />
<br />
<html><br />
<head><br />
<title>Sound Tempest - Layout</title><br />
<style><br />
.header {<br />
background-image: <br />
url("images/header.gif");<br />
background-repeat: repeat-x<br />
}<br />
.bar {<br />
background-image: <br />
url("images/bar.gif");<br />
background-repeat: repeat-x<br />
}<br />
.latest {<br />
background-image: <br />
url("images/bg.gif");<br />
background-repeat: repeat-x<br />
}<br />
</style><br />
</head><br />
<body bgcolor="F0F0F0"><br />
<table width="750" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse" border="1"><br />
<tr><br />
<td colspan="2" height="100" width="100%" class="header"><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/logo.gif"><img src="images/expandlogo.gif"><br />
</td><br />
</tr><br />
<tr><br />
<td colspan="2" height="25" width="100%" class="bar"><br />
Welcome back USERNAME<br />
</td><br />
</tr><br />
<tr><br />
<td width="750" height="200" bgcolor="#FFFFFF"><br />
<table width="750" align="center" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td width="150" height="160" align="center"><br />
Navigation<br />
</td><br />
<td height="200" width="500" class="latest"><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/border.gif"><br />
<table cellpadding="0" border="0" cellspacing="0" width="250" height="100"><br />
<tr><br />
<td colspan="3" height="5"><br />
Latest Mixes<br />
</td><br />
</tr><br />
<tr><br />
<td width="60"><br />
Anime:<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"><br />
</td><br />
<td width="60"><br />
VG:<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"><br />
</td><br />
<td width="60"><br />
Original<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"><br />
</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
</body><br />
</html><!--content-->First of all, keep your CSS statements on the same line. YOu have it written like this:<br />
<br />
<br />
.header {<br />
background-image: <br />
url("images/header.gif");<br />
background-repeat: repeat-x<br />
}<br />
<br />
<br />
Write it like this: (don't forget red-highlighted data, which you did)<br />
<br />
.header {<br />
background-image: url("images/header.gif");<br />
background-repeat: repeat-x; <br />
}<br />
<br />
<td>'s must be on the same line, otherwise it'll screw up the code, thus the page look. It doesn't matter if the line wraps in the text editor, but just make sure there are no spaces in between the td's (excluding word spacing).<br />
<br />
Write your <td>'s like this:<br />
<br />
<td width="60">Anime:<br><img src=http://www.htmlforums.com/archive/index.php/"images/game.gif"></td><br />
<br />
NOTE: Your other <tags> don't matter if they are on different lines.<br />
<br />
Also, you need a DTD and a <meta> tag for the CHARset; which maybe you already have and simply didn't paste.<br />
<br />
Gandalf<br />
:D<!--content-->Thanks for pointing out the TD issue before I got back in there.<!--content-->
 
Top