•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,391 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 3185 | Replies: 11
![]() |
•
•
Join Date: Apr 2008
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
Hi there,
I'm new to this forum. I need help on how to maximize a table cell height.
First I have a table layout that has 3 rows, the first and third rows have fix 50px height.
I want to max the height of the of the 2nd row to fill the remaining space.
This works fine in firefox 2 but not in IE7. the height 100% in the ie 7 causes to overlap the body which cause to create a vertical scroll bar.
how should I do this. what would be the proper value for the 2nd row? I need help.
Also if you put a nested table in the 2nd row without row height define, the 100% height table won't stretch.
here's the code:
regards,
boyetp
I'm new to this forum. I need help on how to maximize a table cell height.
First I have a table layout that has 3 rows, the first and third rows have fix 50px height.
I want to max the height of the of the 2nd row to fill the remaining space.
This works fine in firefox 2 but not in IE7. the height 100% in the ie 7 causes to overlap the body which cause to create a vertical scroll bar.
how should I do this. what would be the proper value for the 2nd row? I need help.
Also if you put a nested table in the 2nd row without row height define, the 100% height table won't stretch.
here's the code:
html Syntax (Toggle Plain Text)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <style> html, body{ height:96%; } body{ border: 1px solid red; } </style> <body> <table border="1" cellspacing="5" cellpadding="5" style="height:100%; width:100%"> <tr> <td style="width:100%;height:50px"> row 1 col 1</td> </tr> <tr> <td style="width:100%;height:100%"> row 2 col 1</td> </tr> <tr> <td style="width:100%;height:50px"> row 3 col 1</td> </tr> </table> </body> </html>
regards,
boyetp
Last edited by peter_budo : Apr 24th, 2008 at 7:47 pm. Reason: Keep It Organized - please use [code] tags
•
•
•
•
the height 100% in the ie 7 causes to overlap the body which cause to create a vertical scroll bar.
Im not sure if I get what you are trying to say but to eliminate the verical scroll bar you can rotate the height of the body until it suits your needs. you can achieve that by decreasing the body height
html Syntax (Toggle Plain Text)
<style> html, body { height:50%; }
Last edited by peter_budo : Apr 24th, 2008 at 7:48 pm. Reason: Please use [code] for multiple lines and [icode] only for single line of code.
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
•
•
Join Date: Apr 2008
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Im not sure if I get what you are trying to say but to eliminate the verical scroll bar you can rotate the height of the body until it suits your needs. you can achieve that by decreasing the body height
<style>
html, body
{
height:50%;
}
Hi Traicey,
I really appreciate your replay. I already tried different percentage, the latter table is a layout and they are dynamically created based on how many gadgets/widgets that I'm going to put base on our xml cofiguration. This table can have tables inside the td.
So the table inside the table won't stretch through the length of the td.
Actually if I used quirks mode works fine but I don't want to go that route.
I really need help on this.
boyetp
•
•
Join Date: Apr 2008
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
don't use height:100%
<td style="width:100%;height:100%"> row 2 col 1</td>
use height:100px
<td style="width:100%;height:100px"> row 2 col 1</td>
and find the difference
Hi Arevelli,
I have to stretch this cell to fill up the remaining spaces.
This table can have tables inside the td.
So the table inside the table won't stretch through the length of the td.
regards,
boyetp
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,433
Reputation:
Rep Power: 11
Solved Threads: 295
Why do you have CSS outside of head tag? It should be inside header tag or use inline option (inside the tag you wish to adjust with css)
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
•
•
Join Date: Apr 2008
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Why do you have CSS outside of head tag? It should be inside header tag or use inline option (inside the tag you wish to adjust with css)
Hi Peter,
I can move the styles into the header or use inline style with the same result.
This is just my test page.
boyetp
•
•
Join Date: Feb 2008
Location: bangalore
Posts: 19
Reputation:
Rep Power: 1
Solved Threads: 2
Last edited by peter_budo : Apr 30th, 2008 at 7:44 am. Reason: Keep It Organized - plase use [code] tags
aravelli ramesh
There is NO way to exactly fill a screen vertically that works on all browsers, screen resolutions, and viewport sizes.
- It's impossible to make a page that fits perfectly in the vertical direction on all monitors.
- It is impossible to place anything against the bottom edge of the screen.
The Internet is not designed to work that way. It is designed to expand pages downward as much as is necessary to fit the entire content served. Screen height and the bottom edge of the screen are undefined in Internet protocols.
You can choose among these possibilities:
1. Design your page for one screen resolution, and accept the fact that people with other screen resolutions are going to see either scroll bars or a smaller page in the upper left corner.
2. Design your page for the lowest resolution, and let the remainder of the screen be blank if a higher resolution monitor displays it.
3. Design your page to fit against the top of the screen, and expand to fit the width (which does work). Use a repeating background image to fill the rest of the screen downward.
4. You could try to wrestle with JavaScript functions intended to find the screen height. But they are not standardized across browsers, and are totally undefined on many browsers.
5. You could create an image containing the entire page, and then choose a display that fits the image to the window horizontally. It will then approximately fit vertically. But it won't work right on the new widescreen monitors. And you can't have any links on this page.
- It's impossible to make a page that fits perfectly in the vertical direction on all monitors.
- It is impossible to place anything against the bottom edge of the screen.
The Internet is not designed to work that way. It is designed to expand pages downward as much as is necessary to fit the entire content served. Screen height and the bottom edge of the screen are undefined in Internet protocols.
You can choose among these possibilities:
1. Design your page for one screen resolution, and accept the fact that people with other screen resolutions are going to see either scroll bars or a smaller page in the upper left corner.
2. Design your page for the lowest resolution, and let the remainder of the screen be blank if a higher resolution monitor displays it.
3. Design your page to fit against the top of the screen, and expand to fit the width (which does work). Use a repeating background image to fill the rest of the screen downward.
4. You could try to wrestle with JavaScript functions intended to find the screen height. But they are not standardized across browsers, and are totally undefined on many browsers.
5. You could create an image containing the entire page, and then choose a display that fits the image to the window horizontally. It will then approximately fit vertically. But it won't work right on the new widescreen monitors. And you can't have any links on this page.
Last edited by MidiMagic : May 2nd, 2008 at 1:38 am.
Daylight-saving time uses more gasoline
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple cell cell phones china congress consumer email gpt guid partition table iphone ipod kernel keynote lg linux macworld microsoft mobile motorola nokia partition phone phones playstation prada ps3 samsung stocks technology technology stocks termination fees touchscreen valentine's day video web 500
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: AJAX comment form
- Next Thread: Accordion go to selected element start??



Linear Mode