473,395 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

table relative and fixed dimensions

Hi,

I am trying to build one HTML page with a table occupying the entire
page and having two rows. The upper row contains data, while the lower
row contains two buttons.

My problem is: I want the lower row to always stay 60 pixels height,
while the upper row taking the rest of the page. And at the same time,
when the upper row contains a large text, a scroll bar in the right
part to show up.

What I succeeded in doing so far was to have a relative dimension for
the lower row (20%), but not a fixed one.

Also, this code works only for Mozilla, while for IE, I need to change
the div's style's height to 100%.

Here's the code:

<html>
<body style="height:100%; margin: 0px; padding: 0px; overflow:hidden;">

<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr height="80%">
<td>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<td>
<div style="position:absolute; top: 0px; bottom: 68px; width:
100%; height:80%; overflow: auto;">

a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br> a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br> a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br> a<br>a<br>a<br>a<br>a<br>a<br>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr height="1px">
<td valign="top" style="background-color:#ff0000" height="1px"/>
</tr>
<tr>
<td align="right">
<input type="button" value="hello1">&nbsp;<input type="button"
value="hello2">&nbsp;
</td>
</tr>
</table>
</body>
</html>

Do you know how can I convince Mozilla to put a scrollbar in the upper
row and still keep the lower row at a fixed height? And how can I make
this code work for both Mozilla and IE?

Thanks,
Marius

Jul 21 '05 #1
1 4184
Hi,
ha******@gmail.com wrote:
[...]
Do you know how can I convince Mozilla to put a scrollbar in the upper
row and still keep the lower row at a fixed height? And how can I make
this code work for both Mozilla and IE?


try to set also <html> to height:100%. The Scrollbar should be set with
overflow:scroll.
http://www.w3.org/TR/CSS21/visufx.ht...rflow-clipping
Chris
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
4
by: N. Demos | last post by:
The following code renders as intended in IE (A TABLE, with cells of fixed width and height, inside of a DIV with fixed width and height and overflow set to hidden.) In Firefox, the table cells...
3
by: N. Demos | last post by:
I have a single row table with fixed dimensioned cells nested inside a fixed dimensioned div, which has overflow: hidden. The div's dimensions are such that It should only display the first two...
17
by: Matt Kruse | last post by:
I'm looking for the best JS/CSS solution to add functionality to tables. The only browser which needs to be supported is IE5.5+, but no activeX can be used. to be able to do: - Fixed header row...
1
by: Greg | last post by:
Hi, I need to implement a table in XBRL. Let's assume I have 2 simple tables to define: TABLE 1 col1 col2 row1 A C row2 B D TABLE 2
9
by: PeteCresswell | last post by:
I've got something called "Reference Rates". The idea is that on a given day, we have various rates of return for various entities. e.g. Libor 3-month return, Libor 6-month return, US Treasury...
2
by: dfdavis.mtu | last post by:
I have a table that I dynamically fill with data from a database for medical companies to be able to determine if their patients meet certain criteria. However they want a fixed header for it so...
1
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into...
3
by: jerrygadd | last post by:
Hi can anyone please help? I have a need to make a table of fixed size, containing three rows, where the middle row auto expands to fill the remaining space between the top and bottom rows. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.