PDA

View Full Version : Can't get text over image!



imbored
01 Dec 2006, 06:45 PM
So I read a tutorial on how to get text over an image. You do this by deleting the picture and adding to table background. Now I'm trying to do this, and the first one works fine:
http://img98.imageshack.us/img98/3136/img1ph0.png
But when I try to do the second box, it gets all messed up:
http://img465.imageshack.us/img465/8021/img2cw1.png

Also, when I try doing the second box first, that one works fine, but when I do the first one afterwards, then it gets messed up.

Any idea how to fix this?

Also would like to add that it doesnt get messed up when I add the background, it gets messed up as soon as I delete the picture.

Code:
<td rowspan="2">
<img src="../images/pimpmytoon_47.png" width="18" height="462" alt=""></td>


<td colspan="7" background="../images/pimpmytoon_48.png">&nbsp;</td>


<td colspan="4" rowspan="2">
<img src="../images/pimpmytoon_49.png" width="48" height="462" alt=""></td>


<td colspan="18" align="center" valign="top" background="../images/pimpmytoon_50.png">&nbsp;</td>


<td rowspan="2">
<img src="../images/pimpmytoon_51.png" width="1" height="462" alt=""></td>
<td colspan="2" rowspan="2">
<img src="../images/pimpmytoon_52.png" width="17" height="462" alt=""></td>
</tr>
<tr>
<td colspan="7">
<img src="../images/pimpmytoon_53.png" width="252" height="36" alt=""></td>
<td colspan="18">
<img src="../images/pimpmytoon_54.png" width="636" height="36" alt=""></td>
</tr>
<tr>
<td colspan="32">
<img src="../images/pimpmytoon_55.png" width="971" height="23" alt=""></td>
<td>
<img src="../images/pimpmytoon_56.png" width="1" height="23" alt=""></td>
</tr>
<tr>
<td>
<img src="../images/spacer.gif" width="26" height="1" alt=""></td>
<td>

heres just that particular section of the table. Its a huge table (the whole website is in the table), so I'm assuming you wouldnt want to look through it...

Wickham
02 Dec 2006, 07:02 AM
You have so many colspans and rowspans you have probably got them mixed up.

The first sequence of td tags is:-
1+7+4+18+1+2 = 33 columns.

The next sequence is:-
7+18 = 25 plus those with rowspan="2" from the first sequence:-
1+4+1+2 = 8.....plus 25 = 33... OK so far.

The third sequence is only 32 columns.
The fourth set of td tags has only one column (unless you haven't shown the remainder).

Tables need the same number in each row, or start a new table.
Remember that each td column has to be the same width as the one above (if no widths are given they will all be the width of the widest in that column). Start a new table if you want different width columns or number of columns.