Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Location
    England
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with tables

    If I enter the following code I cannot get the picture right aligned because of the text in the bottom row. If I remove the text, the picture is right aligned. How do I fix this problem while still maintaining the layout.

    <html>
    <body>
    <table width=780 border="1" cellpadding="0" cellspacing="1">
    <tr>
    <td width="180" rowspan="3">blank</td>
    <td colspan="2">blank</td>
    <td width="102" rowspan="2"><img src="images/test.jpg" width="102" height="135" align="right"></td>
    </tr>
    <tr>
    <td width="256">blank</td>
    <td width="227">blank</td>
    </tr>
    <tr>
    <td colspan="3">blankfr frefref erferf erfrefer fer fer fref erf er ferfreferf
    erfrefrefrefer frrefrefre referferfre frerferfref rfrefrefref reiufheruf freiufhiuerhf fuerihfiurehif freifhreiuf fioerhfer fureiufh erfhiuerhfiuehriufhiuer fiuerhife ferfhre urefier</td>
    </tr>
    </table>
    </body>
    </html>
    Last edited by simwit; 12-21-2002 at 06:10 PM.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Saskatoon SK Canada
    Posts
    174
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Try this:

    <td width="102" rowspan="2" align=right><img src="images/test.jpg" width="102" height="135"></td>

    or this way

    <p align=right>><img src="images/test.jpg" width="102" height="135"></p>

    cp

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Location
    England
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <td align="right" width="102" rowspan="2"><p align=right><img src="images/test.jpg" width="102" height="135" align="right"></p></td>

    Tried all those methods. Still doesn't seem to work. It seems to lose it's alignment when the text in the bottom row overflows and word wraps. Any ideas?

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    Saskatoon SK Canada
    Posts
    174
    Thanks
    2
    Thanked 0 Times in 0 Posts
    ok I see the real problem. You need to size your blank tables cells with spacer gifs in addition to using the width="" attribute on the <td>. I know this seems stupid but browsers really are stupid and you need to tell them exactly what to do. Sizing table cells with transparent gif's 1px tall by wide will fix your problem.

    In photoshop create a new file with transparent background that is 1px by 1px. Then save for web with transparency turned on and chose gif. Name it clr.gif or spacer.gif or something. Now put it in your table to set the widths of your cells.

    <html>
    <body>
    <table width=780 border="1" cellpadding="0" cellspacing="1">
    <!-- table sizer row -->
    <tr>
    <td><img src="spacer.gif" width=180 height=1 border=0></td>
    <td><img src="spacer.gif" width=256 height=1 border=0></td>
    <td><img src="spacer.gif" width=227 height=1 border=0></td>
    </tr>
    <!-- table content -->
    <tr>
    <td width="180" rowspan="3">blank</td>
    <td colspan="2">blank</td>
    <td rowspan="2" align="right"><img src="images/test.jpg" width="102" height="135"></td>
    </tr>
    <tr>
    <td>blank</td>
    <td>blank</td>
    </tr>
    <tr>
    <td colspan="3">blankfr frefref erferf erfrefer fer fer fref erf er ferfreferf
    erfrefrefrefer frrefrefre referferfre frerferfref rfrefrefref reiufheruf freiufhiuerhf fuerihfiurehif freifhreiuf fioerhfer fureiufh erfhiuerhfiuehriufhiuer fiuerhife ferfhre urefier</td>
    </tr>
    </table>
    </body>
    </html>

    That whould fix ya!
    Colin
    Last edited by dreamingdigital; 12-21-2002 at 09:11 PM.

  • #5
    New to the CF scene
    Join Date
    Dec 2002
    Location
    England
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Spot on Colin ya legend! Worked a treat.

    Thanks for the tip

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Try &ampnbsp; in there. There's really never any reason to use transparent spacers if you know what you're doing. They just make your page load slower. Spot on that.
    Last edited by zoobie; 12-21-2002 at 11:08 PM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #7
    New to the CF scene
    Join Date
    Dec 2002
    Location
    England
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by zoobie
    Try &ampnbsp; in there. There's really never any reason to use transparent spacers if you know what you're doing. They just make your page load slower. Spot on that.
    Nope. Didn't work. No spot on that

  • #8
    Regular Coder
    Join Date
    Sep 2002
    Location
    Saskatoon SK Canada
    Posts
    174
    Thanks
    2
    Thanked 0 Times in 0 Posts
    there is always a reason to use transparent spacers. what planet do you live on?

  • #9
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Nebber used one yet.

    PS - Heard that one 20 years ago when you were a toddler in pampers
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #10
    New to the CF scene
    Join Date
    Dec 2002
    Location
    England
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Everyone stop *****ing. The fact of the matter is that Colin's method worked and I am happy. Zoobie, if you have a solution without spacers, since you never use them, please post it and I'll test it out.

  • #11
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts


    <html>
    <body>
    <table width=780 border="1" cellpadding="0" cellspacing="1">
    <tr>
    <td width="180" rowspan="3">blank1</td>
    <td colspan="2">blank2</td>
    <td width="102" rowspan="2"><img src="images/test.jpg" width="102" height="135"></td>
    </tr>
    <tr>
    <td width="256">blank3</td>
    <td width="227">blank4</td>
    </tr>
    <tr>
    <td colspan="3" width="483">blankfr frefref erferf erfrefer fer fer fref erf er ferfreferf
    erfrefrefrefer frrefrefre referferfre frerferfref rfrefrefref reiufheruf freiufhiuerhf fuerihfiurehif freifhreiuf fioerhfer fureiufh erfhiuerhfiuehriufhiuer fiuerhife ferfhre urefier</td>
    </tr>
    </table>
    </body>
    </html>







    Sorry, didn't notice the text not going completely to the right border
    Last edited by Mr J; 12-22-2002 at 04:56 PM.

  • #12
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    If you're happy, just use it.

    I'm still trying to figure out what *****ing is.

    I guess it's the beautiful weather here...Sunny and 50-60 degrees all month long in der Rockys...Time to get out!
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #13
    New to the CF scene
    Join Date
    Dec 2002
    Location
    England
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry. was nothing offensive just bi*ching. p*ssing down with rain in england. there's a change.


  •  

    Posting Permissions

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