Jump to content

Recommended Posts

okay, this might be CSS, it might be HTML. If I make the table border="1" instead of "0" the middle row will automatically take up whatever percentage of the page is left over after subtracting the header and footer rows. If I don't, it's only as high as the content it contains -- which, in this case, is just "some text".

Having a border isn't exactly the best option -- that being said, I'm guessing this is a firefox bug. Any ideas?

[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
...
<table border="0" style="height:100%; width:100%">
<tr><td style="height:125px; width:100% background:url(image/header.jpg) repeat-x top; text-align:center;"><img src="images/logo.jpg" width="250" height="50"></td></tr>
<tr><td style="width:100%">some text</td></tr><!-- supposed to auto-stretch to height available -->
<tr><td style="width:100%; height:25px; background:url(image/footer.jpg) repeat-x;"></td></tr>
</table>
...[/code]
Link to comment
https://forums.phpfreaks.com/topic/28943-hacking-a-firefox-css-bug/
Share on other sites

border style on the table only doesn't affect the problem. If I use the style sheet to assign a border to table AND td,
[code=php:0]table, td {
border:1px solid #000;
}[/code]

it properly sizes the middle column. BUT, changing it to 0px will shrink that middle cell back down to match the contents. So, whether I use the html method "border=0" or the CSS method -- the results are the same.

[b]EDIT:[/b] Got it! thanks for the tip. I added a border:1px solid #FFF; (same color as the background) to the one cell that's supposed to stretch and presto -- we have liftoff.

The real problem persists, though. If I built this on a gradient background, I'd be dead. Any other workarounds still welcome.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.