Results 1 to 5 of 5

Thread: table cell "<td>" Height Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    table cell "<td>" Height Problem

    Hey everyone,

    I have a weird problem with my master page on a website, a banner image is placed within a table under:

    "<tr><td><img src="images\Banner.jpg" /><td /><tr />"

    When loading a my website onto different pages the table cells height changes depending on the height of the table. I have tried to place:

    <td height="100px" ><td />

    But this doesn't help also. I hope everyone can understand what I just wrote. Basically when the height of the table is large the banner image looks like I placed "<br />" on top and below the image, making the it look inconsistent.

    Can somone please, please, please help.

  2. #2
    Addicted Member
    Join Date
    Jul 2002
    Location
    Cleveland, Ohio
    Posts
    185

    Re: table cell "<td>" Height Problem

    you don't have any cell padding or anything like that do you? Also, is it the same image everytime or is it different images for different things?
    "The Force will be with you, always."

    --Ben Kenobi--

  3. #3
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: table cell "<td>" Height Problem

    Looks like you're using a table for your look & feel. CSS based design would be best - have a look at http://www.csszengarden.com/ to see how the whole look & feel of a site may be changed via CSS only.
    However, if you can't swap out table layout for CSS, you could drop a div into the banner cell and set the height on that div:
    Code:
    <style type="text/css">
    .banner { height:100px; }
    </style>
    
    <tr><td><div class="banner"><img src="images/banner.jpg" /></div></td></tr>

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Re: table cell "<td>" Height Problem

    Hey there,

    I'm glad people actually understood that.

    jpiller - Yes there is cell padding on the table itself and the value of the cell padding doesn't change, the banner does not change also. Is there an issue there will using cell padding and spacing?

    axion_sa - I tried using the css class method you recommended with the div added but there was no luck there.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Re: table cell "<td>" Height Problem

    Hey guys, I have found the problem, the height of the table was set to 100% and the table row below had it's height hardcoded which forced the banners cell to fill the rest of the space.

    Cheers for all the help.

Posting Permissions

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



Click Here to Expand Forum to Full Width