Results 1 to 2 of 2

Thread: Can't get text over image!

  1. #1
    Join Date
    Dec 2006
    Posts
    1

    Can't get text over image!

    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...

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    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.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •