SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's wrong with this code? Please help, I'm so frustrated! :-(

    I'm am making a page.

    www.geocities.com/adampolselli/tips.html

    The second table is not working or showing up right for some reason.

    I've looked over the code and I can't find what's wrong, but I'm not an HTML expert.

    Could someone give it a quick looksy and see what's wrong with the second table, please? It's the one with the image "Table of Contents" and everything under it.

    BTW, here's the code for the second table if you don't feel like opening the code yourself:

    Code:
    <div align="center">
    <table width="196" border="0" cellpadding="0" cellspacing="0">
    
    <tr>
    <td colspan="5"><img src="images/toc_header.gif"></td>
    </tr>
    
    <tr>
    <td bgcolor="#FF6600" width="8" height="200" valign="top">&nbsp;</td>
    <td bgcolor="#FFFFFF" width="180" height="200" valign="top" colspan="3">&nbsp;</td>
    <td bgcolor="#FF6600" width="8" height="200" valign="top">&nbsp;</td>
    </tr>
    
    <tr>
    <td colspan="2" rowspan="2"><img src="images/sidebar_bl_corner.gif"></td>
    <td bgcolor="#FF6600" width="132" height="24">&nbsp;</td>
    <td colspan="2" rowspan="2"><img src="images/sidebar_br_corner.gif"></td>
    </tr>
    
    <tr>
    <td bgcolor="#FF6600" width="132" height="8" valign="top"><img src="spacer.gif" width="1" height="1"></td>
    </tr>
    </table></div>
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  2. #2
    differently saned russbellon's Avatar
    Join Date
    Jun 2001
    Location
    alternate dementian
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you're missing your colspan= in the last row, but i don't know if that's the problem or not
    edit: nevermind, didn't notice the rowspans above it.
    אין סוף

  3. #3
    differently saned russbellon's Avatar
    Join Date
    Jun 2001
    Location
    alternate dementian
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try adding a row of spacer.gifs at the top for all 5 cells, 8, 24, 132, 24, 8 x i pixel high
    אין סוף

  4. #4
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    russbellon -- that's way too complicated. Do this Adam, it fixes your problem -- but only superficially:
    Code:
    <div align="center"><table width="196" border="0" cellpadding="0" cellspacing="0">
    
    <tr>
    <td width="196" colspan="3"><img src="images/toc_header.gif"></td>
    </tr>
    
    <tr>
    <td bgcolor="#FF6600" width="32" height="200" valign="top">&nbsp;</td>
    <td bgcolor="#FFFFFF" width="132" height="200" valign="top">&nbsp;</td>
    <td bgcolor="#FF6600" width="32" height="200" valign="top">&nbsp;</td>
    </tr>
    
    <tr>
    <td width="32" rowspan="2"><img src="images/sidebar_bl_corner.gif"></td>
    <td bgcolor="#FF6600" width="132" height="24" rowspan="2">&nbsp;</td>
    <td width="32" rowspan="2"><img src="images/sidebar_br_corner.gif"></td>
    </tr>
    
    </table></div>
    Tables are not made to be as complex as you want them to be -- you simply had too many columns specified in your coding. Here's a solution. Use this code below instead of the one above:
    Code:
    <div align="center"><table width="196" border="0" cellpadding="0" cellspacing="0">
    
    <tr>
    <td width="196" colspan="3"><img src="images/toc_header.gif"></td>
    </tr>
    
    <tr>
    <td bgcolor="#FF6600" width="8" height="200" valign="top">&nbsp;</td>
    <td bgcolor="#FFFFFF" width="180" height="200" valign="top">&nbsp;</td>
    <td bgcolor="#FF6600" width="8" height="200" valign="top">&nbsp;</td>
    </tr>
    
    <tr>
    <td bgcolor="#FF6600" width="196" height="24" colspan="3">&nbsp;</td>
    </tr>
    
    </table></div>
    You'll notice now it only has three columns instead of five. Simply make the bottom corners graphics and middle into one graphic 196 pixels in length -- just like the toc_header.gif that you use at the top. Then use that at the bottom. It works. =)
    By the way -- it's a very nice looking layout. Let me know when it's complete -- I'd like to take a look at it if it's all right with you.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  5. #5
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You need to do something about those empty table cells though, Netscape doesn't like them.

  6. #6
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thanks so much guys!

    I didn't expect to get as many great solutions as I did.

    AES: Your idea to make the bottom image stretch completely across the bottom of the table is great. I should've thought of that myself~ . I'll definitely tell you when I'm finished, I'm glad you like the layout. I'll probably post it in the Website Reviews Forums, so you'll see it there sooner or later.

    NICKY: I'll get right to that. If I put "&nbsp" or "<br> in each cell, will netscape recognize them? OR does it have to be a spacer.gif?
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  7. #7
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use <br> or & n b s p ; (with no spaces, stupid Vb)

    Sean
    Last edited by seanf; Jul 22, 2001 at 07:05.
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  8. #8
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you use a spacer.gif then you can utilise it to create a one pixel empty space, you can get away with using a non-breaking space as well.

  9. #9
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah. Unless I'm working with an EXTREMELY small cell (e.g. 1x1 pixel dimensions), I always use the non-breaking space code.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  10. #10
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, thanks. I'm glad that it's easy.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


Bookmarks

Posting Permissions

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