473,395 Members | 1,969 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.

rowspan question

I have a table with three entries.
Some text in the first TD with rowspan=2. An image in the second TD and
a table in the last TD. Whats happening is, as the text in the first TD
grows the table in the last TD goes far away from the image in the
second TD.

Something like
<tr>
<td rowspan=2>
Some text.
</td>
<td>
An image
</td>
</tr>
<tr>
<td>
Another table
</td>
</tr>

Any ideas please?

Thanks
-H

Jul 24 '05 #1
6 1966
htmlrookie wrote:
I have a table with three entries.
Some text in the first TD with rowspan=2. An image in the second TD and
a table in the last TD. Whats happening is, as the text in the first TD
grows the table in the last TD goes far away from the image in the
second TD.

Something like
<tr>
<td rowspan=2>
Some text.
</td>
<td>
An image
</td>
</tr>
<tr>
<td>
Another table
</td>
</tr>

Any ideas please?


The first column takes up two rows. The browser has to decide how to
divide its vertical extent between the two rows that it covers. As the
vertical extent grows, the browser distributes the height increase over
the two rows. There's really nothing you can do about this, other than
using CSS to specify a height for one of the rows and hoping that the
browser uses it to override the default behavior.
Jul 24 '05 #2
me
"htmlrookie" <sy***@yahoo.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
I have a table with three entries.
Some text in the first TD with rowspan=2. An image in the second TD and
a table in the last TD. Whats happening is, as the text in the first TD
grows the table in the last TD goes far away from the image in the
second TD.

Something like
<tr>
<td rowspan=2>
Some text.
</td>
<td>
An image
</td>
</tr>
<tr>
<td>
Another table
</td>
</tr>

Any ideas please?
Thanks
-H


Just a guess but I see no reason why the main table can't have just one row
and two columns (aka two cells in one row). Then you could place the image
and the nested table in one cell and set the vertical alignment of that cell
to "top". See below:
Good Luck,
me

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
</td>
<td valign="top"><img src="???.jpg" width="200" height="170"><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Another table</td>
</tr>
</table>
</td>
</tr>
</table>
Jul 24 '05 #3

"htmlrookie" <sy***@yahoo.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
I have a table with three entries.
Some text in the first TD with rowspan=2. An image in the second TD and
a table in the last TD. Whats happening is, as the text in the first TD
grows the table in the last TD goes far away from the image in the
second TD.

Something like
<tr>
<td rowspan=2>
Some text.
</td>
<td>
An image
</td>
</tr>
<tr>
<td>
Another table
</td>
</tr>

Any ideas please?

Thanks
-H


Your example code doesn't show three TD's across a row. It shows only two;
the third (containing the nested table) is located on a second row. Is that
what you wanted?

Carla
Jul 24 '05 #4

"htmlrookie" <sy***@yahoo.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
I have a table with three entries.
Some text in the first TD with rowspan=2. An image in the second TD and
a table in the last TD. Whats happening is, as the text in the first TD
grows the table in the last TD goes far away from the image in the
second TD.

Something like
<tr>
<td rowspan=2>
Some text.
</td>
<td>
An image
</td>
</tr>
<tr>
<td>
Another table
</td>
</tr>

Any ideas please?

Thanks
-H


This is retro:)

If the code above is what you intend, then this will work (but others will
object): make your first TD a rowspan of 3 & put a transparent .gif in the
3rd row's TD to jack up that table so it sits under the image. Set the
height in the .gif to whatever is needed to make the text in the nested
table reach your image. As your text in the first TD lengthens, add height
to your .gif.

It will validate, btw.

Carla
Jul 24 '05 #5
Thanks Carla. I was able to fix it by adding an image at the end of the
last TD.
Thanks to everyone.
-H

Jul 24 '05 #6

"htmlrookie" <sy***@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thanks Carla. I was able to fix it by adding an image at the end of the
last TD.
Thanks to everyone.
-H


You are welcome. Be sure to tell others you learned it at w3.org;) <g>

Carla
Jul 24 '05 #7

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

Similar topics

2
by: Martin Brunner | last post by:
Hello! I'm planning to make a music database for my own, but maybe someone else found a script which can what I wont so here is what I'm looking for: The Database only should have these...
28
by: Greg Adourian | last post by:
Hi, I'm breaking my head over the following few lines of code, generated with Photoshop Slices. As soon as the structure is slightly complicated, the output is broken. I can't seem to follow...
19
by: Logix | last post by:
Hello! I'm trying to make a sort of online page building system. In order to do this, I represent my page using a HTML table. One of the most basic templates would be a page divided in six...
1
by: Christopher Benson-Manica | last post by:
Is there a way to modify the number of rows spanned by a <tr> element, or must the table be re-drawn to achieve such an effect? -- Christopher Benson-Manica | I *should* know what I'm talking...
7
by: Gawel | last post by:
I need necessarily set RowSpan(ColSpan) property of cell in aspx file(not in cs file). But below statement does not work :(. Any idea ? <TABLE id="Table1" cellSpacing="1" cellPadding="1"...
2
by: steve | last post by:
Hi All I need to change the rowspan, columnspan properties of a control when they are within a TableLayoutPanel (VB.net 2005) At runtime the property is not available, but is at design time ...
7
by: Matt Kruse | last post by:
Using the .cellIndex property of a TH element to find out which table column it is over can cause misleading results when the table has cells which have rowspans or colspans greater than 1. See...
1
by: smilecry | last post by:
I am trying to create a tree table (javascript code was adopted from online source) but the rowspan in td tag does not work well when I toggle the rows. Here is the sample code, notice the row "4"...
0
by: simon | last post by:
hello, relatively new to .net, i'm using vb.net and the 2.0 .net platform I'm trying to display a grid that has a text box on the left in one cell (with a hidden ID), which will be associated...
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:
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...
0
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...
0
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,...

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.