473,832 Members | 2,301 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1992
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.co m> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.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"><i mg src="???.jpg" width="200" height="170"><b r>
<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.co m> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.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.co m> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.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.co m> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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
1893
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 fields: Country - Band - Recommended Songs - Rating And that's all. The only special thing about is that bands from the same
28
6764
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 the logic behind it, figuring out when the table breaks or when it's works OK. I searched for tutorials with examples, so far all I've found are tutorials with cells that meet each other at corners, nothing similar to what I have. I'm assuming if...
19
13388
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 equally proportioned rectangles: <table border="1" cellspacing="0" cellpadding="0" width="200" height="200"> <tr>
1
1385
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 about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
7
349
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" width="300" border="1" runat="server"> <TR> <TD RowSpan="<%# 3 %>">a</TD> <TD>a</TD>
2
17578
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 Any ideas Regards
7
7630
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 example: http://www.javascripttoolbox.com/temp/table_cellindex.html (code pasted below for reference) This behaves according to specs and expectations, however the value of the cellIndex property becomes less useful when using it to determine...
1
3871
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" should be in the Type 1 section (click on the arrow and expand it, it will display correctly), but when it is collapsed, it is pushed downwards to Type 2 section. Could not figure out what is the reason. Any ideas? Thanks! <html> <head>
0
2008
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 to multiple rows (events) on the right. each row on the right will also have a text box ------------------------------------------------------- event 1
0
9794
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
10780
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
10212
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...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5623
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...
0
5788
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4420
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
2
3968
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.