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