473,385 Members | 2,210 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,385 software developers and data experts.

How do I control heights of cells next to a ROWSPANned cell?

Suppose I make a table that looks like

---------
| A | |
|---| |
| B | D |
|---| |
| C | |
---------

What I'd like to do is to have cells A and B only be as high as they
need to be based on their contents, and cell C to take up the remainder
of the vertical space. Can someone tell me how to do this?

Please reply by e-mail as well as posting, if possible.

TIA,
-Lotofun
Jul 20 '05 #1
9 2111
Lot-o-fun wrote:
Suppose I make a table that looks like

---------
A | |
---| |
B | D |
---| |
C | |

---------

What I'd like to do is to have cells A and B only be as high as they
need to be based on their contents, and cell C to take up the
remainder of the vertical space. Can someone tell me how to do this?

Please reply by e-mail as well as posting, if possible.

TIA,
-Lotofun


Make the height of the third cell 100%. Won't take up 100% of the browser
window, will take up 100% of the available space.
Jul 20 '05 #2
Lot-o-fun wrote:
Suppose I make a table that looks like

---------
| A | |
|---| |
| B | D |
|---| |
| C | |
---------

What I'd like to do is to have cells A and B only be as high as they
need to be based on their contents, and cell C to take up the remainder
of the vertical space. Can someone tell me how to do this?

Please reply by e-mail as well as posting, if possible.

TIA,
-Lotofun


<html>
<body>
<table width="100%" height="100%" border="1">
<tr>
<td width="20%" height="100">A</td>
<td width="*" height="100%" rowspan="3">D</td>
</tr>

<tr>
<td width="20%" height="100">B</td>
</tr>

<tr>
<td width="20%" height="*">C</td>

</tr>
</table>
</body>
</html>
change as needed
Jul 20 '05 #3
Weyoun the gowd damn Dominion Vorta who certainly didn't dance
<bl**@blah.blah> wrote:
<table width="100%" height="100%" border="1">
Height is not a valid attribute of table.
<td width="*" height="100%" rowspan="3">D</td>
* is not a valid value for width in this context. Only when used on
the col and colgroup elements may * be used in the width attribute.
<td width="20%" height="*">C</td>


* is not a valid value for height.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4
Steve Pugh wrote:
Weyoun the gowd damn Dominion Vorta who certainly didn't dance
<bl**@blah.blah> wrote:

<table width="100%" height="100%" border="1">

Height is not a valid attribute of table.

<td width="*" height="100%" rowspan="3">D</td>

* is not a valid value for width in this context. Only when used on
the col and colgroup elements may * be used in the width attribute.

<td width="20%" height="*">C</td>

* is not a valid value for height.


?

It works in IE6 and FireFox? Is it not valid? If not, what's the proper
coding to do a wildcard-type value? I wonder....

<tries something>
<html>
<body>
<table width="100%" height="100%" border="1">
<tr>
<td width="20%" height="100">A</td>
<td height="100%" rowspan="3">D</td>
</tr>

<tr>
<td width="20%" height="100">B</td>
</tr>

<tr>
<td width="20%">C</td>
</tr>
</table>
</body>
</html>

Ah ha!
Of course, the default is "*" anyway (or at least "undefined") so the
browser calculates it automatically.
Jul 20 '05 #5
Steve Pugh wrote:
<table width="100%" height="100%" border="1">

Height is not a valid attribute of table.


well... then how do you define the table's height? (without CSS?)

You're right though, I just rechecked the specs and it's not listed and
my pocket guide HTML book has "height" listed as "nonstandard".

Jul 20 '05 #6
On Thu, 01 Apr 2004 14:48:37 +0100, Weyoun the gowd damn Dominion Vorta
who certainly didn't dance <bl**@blah.blah> wrote:
Steve Pugh wrote:
<table width="100%" height="100%" border="1">

Height is not a valid attribute of table.


well... then how do you define the table's height? (without CSS?)


You don't :)

Browsers are expected by authors to perform some magic to make things look
like they want, without any specification about how nested tables, widths
that don't add up 100% and the relation with the viewport are to be
handled.

CSS does have such rules on how (percentage) heigths are supposed to work,
but browsers should forget most of them when handling tables...

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #7
I hate working in percent.. i like pixels better.. but percent has its
advantages

Later,
Keeper
"Weyoun the gowd damn Dominion Vorta who certainly didn't dance"
<bl**@blah.blah> wrote in message news:iAUac.1716$4N3.950@newsfe1-win...
Lot-o-fun wrote:
Suppose I make a table that looks like

---------
| A | |
|---| |
| B | D |
|---| |
| C | |
---------

What I'd like to do is to have cells A and B only be as high as they
need to be based on their contents, and cell C to take up the remainder
of the vertical space. Can someone tell me how to do this?

Please reply by e-mail as well as posting, if possible.

TIA,
-Lotofun


<html>
<body>
<table width="100%" height="100%" border="1">
<tr>
<td width="20%" height="100">A</td>
<td width="*" height="100%" rowspan="3">D</td>
</tr>

<tr>
<td width="20%" height="100">B</td>
</tr>

<tr>
<td width="20%" height="*">C</td>

</tr>
</table>
</body>
</html>
change as needed

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.669 / Virus Database: 431 - Release Date: 4/26/04
Jul 20 '05 #8
lol ..

IE has always auto maticly done that.. but watch.. netscape might look
retarded.

BTW: not defining a cell size defaults to 10px

However!!!!!\

<Table width="40" Height="40" border="1" cellpadding="1" cellspacing="1"
bordercolordark="#006699" bordercolorlight="#009999">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

That code will auto set each cell to 20px X 20px.. coding with undefinded
height and width.. can cause probs.. i recomend adjusting each TR height..
for content in pixels or percent.. i use pixels.. but whitch ever you are
comfortable with.

Later,
Keeper

"Weyoun the gowd damn Dominion Vorta who certainly didn't dance"
<bl**@blah.blah> wrote in message
news:QZ**************@newsfe3-win.server.ntli.net...
Steve Pugh wrote:
Weyoun the gowd damn Dominion Vorta who certainly didn't dance
<bl**@blah.blah> wrote:

<table width="100%" height="100%" border="1">

Height is not a valid attribute of table.

<td width="*" height="100%" rowspan="3">D</td>

* is not a valid value for width in this context. Only when used on
the col and colgroup elements may * be used in the width attribute.

<td width="20%" height="*">C</td>

* is not a valid value for height.


?

It works in IE6 and FireFox? Is it not valid? If not, what's the proper
coding to do a wildcard-type value? I wonder....

<tries something>
<html>
<body>
<table width="100%" height="100%" border="1">
<tr>
<td width="20%" height="100">A</td>
<td height="100%" rowspan="3">D</td>
</tr>

<tr>
<td width="20%" height="100">B</td>
</tr>

<tr>
<td width="20%">C</td>
</tr>
</table>
</body>
</html>

Ah ha!
Of course, the default is "*" anyway (or at least "undefined") so the
browser calculates it automatically.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.669 / Virus Database: 431 - Release Date: 4/26/04
Jul 20 '05 #9

"Keeper" <en**********@usadatanet.net> wrote in message
news:MK********************@usadatanet.net...
lol ..

IE has always auto maticly done that.. but watch.. netscape might look
retarded.
Please do not give any more advice until you learn what the fuck you're
talking about.
The snippet below is the most disgusting example of know-nothingness I've
seen on this newsgroup in months.

-Karl

BTW: not defining a cell size defaults to 10px

However!!!!!\

<Table width="40" Height="40" border="1" cellpadding="1" cellspacing="1"
bordercolordark="#006699" bordercolorlight="#009999">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

That code will auto set each cell to 20px X 20px.. coding with undefinded
height and width.. can cause probs.. i recomend adjusting each TR height..
for content in pixels or percent.. i use pixels.. but whitch ever you are
comfortable with.

Later,
Keeper

"Weyoun the gowd damn Dominion Vorta who certainly didn't dance"
<bl**@blah.blah> wrote in message
news:QZ**************@newsfe3-win.server.ntli.net...
Steve Pugh wrote:
Weyoun the gowd damn Dominion Vorta who certainly didn't dance
<bl**@blah.blah> wrote:
><table width="100%" height="100%" border="1">
Height is not a valid attribute of table.
><td width="*" height="100%" rowspan="3">D</td>
* is not a valid value for width in this context. Only when used on
the col and colgroup elements may * be used in the width attribute.
><td width="20%" height="*">C</td>
* is not a valid value for height.


?

It works in IE6 and FireFox? Is it not valid? If not, what's the proper
coding to do a wildcard-type value? I wonder....

<tries something>
<html>
<body>
<table width="100%" height="100%" border="1">
<tr>
<td width="20%" height="100">A</td>
<td height="100%" rowspan="3">D</td>
</tr>

<tr>
<td width="20%" height="100">B</td>
</tr>

<tr>
<td width="20%">C</td>
</tr>
</table>
</body>
</html>

Ah ha!
Of course, the default is "*" anyway (or at least "undefined") so the
browser calculates it automatically.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.669 / Virus Database: 431 - Release Date: 4/26/04

Jul 20 '05 #10

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

Similar topics

8
by: Andrew Ayre | last post by:
Hi, I have the following table layout: --------------------- | A | E | ------ |
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
0
by: RSB | last post by:
Hi Every one, i am trying to create a UserControl and i am passing a Array of strings to it. Now based on the Array elements i am creating the LinkButtons Dynamically. I am also passing a Event to...
3
by: Tim::.. | last post by:
Hi, I keep getting the following error in my code: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index I presume it is because...
1
by: keith.walter | last post by:
My first asp.net app is almost "done" and I am stuck. Here is my situation: I have a "mother" page add_customer.aspx and a"child" user control add_group.ascx. On the mother page is an "add...
0
by: utvecklare.net | last post by:
Hi, How do I see to that an encapsulated control is surely created? I´m trying to create a WebUserControl (A), witch is supposed to be able to contain other WebUserControls (ie B). I´m...
0
by: loga123 | last post by:
Hi All, I am very new to .net and trying to develop a small application. I am using asp .net 2.0. I have a table control (server) in my code that has header row like this. <asp:Table...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
1
by: bgernon | last post by:
I have a table that consists of two rows with three cells each row. The cells contain textboxes. I am able to successfully add a new row with textboxes when a button is clicked. The problem is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.