473,808 Members | 2,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2124
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 "nonstandar d".

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@newsfe 1-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" bordercolorligh t="#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**********@u sadatanet.net> wrote in message
news:MK******** ************@us adatanet.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" bordercolorligh t="#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
3080
by: Andrew Ayre | last post by:
Hi, I have the following table layout: --------------------- | A | E | ------ |
0
1926
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.. Chris. code :
0
1675
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 this control and Lining the OnClick event of these LinkButtons to this Event. (Which works fine). Now the Thing which i cannot achieve is i want to Change the Back Color of the Clicked to LinkButton To a different color and i also don't want to...
3
2354
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 I have the wrong control number but am not 100% sure! How do I work this out? Thanks
1
2642
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 group" button that makes the the panel inwhich the add_customer control resides VISIBLE=True. On the control, the user can edit the list of groups, or add a new one. After the edit is complete I want to make the panel again VISIBLE=False, as well as...
0
814
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 creating the control (A) dynamically. The problem occurs in the inner control (B). I get the error: "The object reference is not set to an instance of an object."
0
2098
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 id="Table1" GridLines="Both"
0
5296
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 the days in the week with dates and textboxes to fill in some data. row 1: question
1
2061
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 retaining the newly added row with the filled in textboxes on the next button click. I think I am handling my viewstate incorrectly. This code adds the new row: Private Sub addRowsInTable() Dim TextID As Integer Dim TextIDCount...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10628
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10373
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9195
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.