473,467 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Implied width of implied center column in 3 column table

I have a table with 3 rows, and two pieces of data to display
in each row. However, the first element of the last two rows
and the 2nd element of the 1st row are very short. This would
seem to imply three columns where the first and last columns
are narrow and the (implied) middle one getting the bulk of
the width.

<table border id=tbl>
<tr><td colspan=2><nobr>This is supposed to be long</nobr></
td><td>Fred</td></tr>
<tr><td>Bill</td><td colspan=2><nobr>More long text goes here</nobr></
td></tr>
<tr><td>Joe</td><td colspan=2><nobr>Still more long text</nobr></td></
tr>
</table>

The short version of the question is how can I prop this
up (within the table framework)? I thought to put
style='width:1%' on the shortie elements. This resulted in
a very wide table in IE, so after adding the same
style='width:1%' (HTML shown below) to the table element
I get more or less what I was after.

However, in my FF I get an incredibly narrow middle column
(which is to say that the outer columns are too wide) and even
setting specific widths on the left and rightmost columns
doesn't seem to alter this implied middle width. Is there
anyway I can shore up the FF display?

Thanks,
Csaba Gabor from Vienna

This version works in my IE6:
<table border id=tbl style='width:1%'>
<tr><td colspan=2><nobr>This is long text</nobr></td><td style='width:
1%'>Fred</td></tr>
<tr><td style='width:1%'>Bill</td><td colspan=2><nobr>More long text
goes here</nobr></td></tr>
<tr><td style='width:1%'>Joe</td><td colspan=2><nobr>Still more long
text</nobr></td></tr>
</table>
Jun 30 '08 #1
3 2256
Csaba Gabor wrote:
I have a table with 3 rows, and two pieces of data to display
in each row. However, the first element of the last two rows
and the 2nd element of the 1st row are very short. This would
seem to imply three columns where the first and last columns
are narrow and the (implied) middle one getting the bulk of
the width.

<table class="slightly reformatted by John">
<tr>
<td colspan=2>This is supposed to be long</td>
<td>Fred</td>
</tr>
<tr>
<td>Bill</td>
<td colspan=2>More long text goes here</td>
</tr>
<tr>
<td>Joe</td>
<td colspan=2>Still more long text</td>
</tr>
</table>
Well, I can't really help you, because I'm stuck on the basic
content-format question. Namely, this doesn't look like tabular data, so
I'm wondering why you are trying to use a table in the first place. What
is the relationship between "This is supposed to be long" and "Bill"?

If you really have a 2x3 table, then mark it up as a 2x3 table. (I see
that that's what you've done with the elements, but the colspan
attributes make the visual results somewhat more messy.) If it's just a
handful of text items, consider making them div or p elements, maybe
with spans inside them.

Also, I'd be more inclined to play with this if you'd provided a URL (or
two) with your attempts so far.
>
This version works in my IE6:
<table border id=tbl style='width:1%'>
Well, that's IE for you. ;-)
--
John
Pondering the value of the UIP: http://improve-usenet.org/
Jun 30 '08 #2
On Jun 30, 11:45 am, John Hosking <J...@DELETE.Hosking.name.INVALID>
wrote:
Csaba Gabor wrote:
I have a table with 3 rows, and two pieces of data to display
in each row. However, the first element of the last two rows
and the 2nd element of the 1st row are very short. This would
seem to imply three columns where the first and last columns
are narrow and the (implied) middle one getting the bulk of
the width.
<table class="slightly reformatted by John">
<tr>
<td colspan=2>This is supposed to be long</td>
<td>Fred</td>
</tr>
<tr>
<td>Bill</td>
<td colspan=2>More long text goes here</td>
</tr>
<tr>
<td>Joe</td>
<td colspan=2>Still more long text</td>
</tr>
</table>

Well, I can't really help you, because I'm stuck on the basic
content-format question. Namely, this doesn't look like tabular data, so
I'm wondering why you are trying to use a table in the first place. What
is the relationship between "This is supposed to be long" and "Bill"?
So if I understand you correctly, are you saying that because
you can't imagine a legitimate form of usage for this type of table
according to your own metrics, you are unable (can't) help?

There are probably very few configuarations of small tables
which don't support some legitimate form of table. Here, let me
help you. Imagine that you are out hiking and you come to a T
trail intersection. You might see:

Water, go that a way =>
Trailhead, to your right =>
<= Outhouse, go this a way
<= Ranger station, to the left

Call it the Excel way of doing things, if you will.
The left column is for left arrows. The right
column is for right arrows. The middle column
is for descriptions. However, as with the
Excel model, spillover is allowed (well, as far
as I know, Excel doesn't have backward
spillover, but that's another issue).

Certainly all the elements of my example are
atomic data - at issue is whether spillover
should be allowed. Some design principles
say the visual impact is more powerful with
such spillover (I don't know it's official name,
but I think of it as the principle of alignment),
but whether the data should then be in a
table or not is a matter of choice.
If you really have a 2x3 table, then mark it up as a 2x3 table. (I see
that that's what you've done with the elements, but the colspan
attributes make the visual results somewhat more messy.) If it's just a
handful of text items, consider making them div or p elements, maybe
with spans inside them.
Of course this doesn't have to be a table. There
are several ways to do it. One way, in keeping
with the table model, that your above text
suggested to me was that (assuming that all the
elements with short text on the right are up on
top) I could just have the top row of the table
contain a single TD which contains a TABLE
which containes all the short-text-on-right rows.
But I prefer not to stick tables in tables.

In any case, I don't have a problem with getting a
particular look. But evidently my model of table
drawing has come up a bit short in explaining what's
going on here. That understanding is what I am
after through this example.
Also, I'd be more inclined to play with this if you'd provided a URL (or
two) with your attempts so far.
Unfortunately, I have just discovered yesterday that
my router on my machine is blocking access from
the internet at large. But, other than the containing
minimal elements (ie. html, head, title, body), that's
the whole page.

By the way, at the risk of starting a flame war,
do you really think that class was intended for
use as a comment field? (And thanks for the
reformatting, by the way)

Csaba Gabor from Vienna
This version works in my IE6:
<table border id=tbl style='width:1%'>

Well, that's IE for you. ;-)
--
John
Jun 30 '08 #3
On 2008-06-30, Csaba Gabor <da*****@gmail.comwrote:
I have a table with 3 rows, and two pieces of data to display
in each row. However, the first element of the last two rows
and the 2nd element of the 1st row are very short. This would
seem to imply three columns where the first and last columns
are narrow and the (implied) middle one getting the bulk of
the width.

<table border id=tbl>
<tr><td colspan=2><nobr>This is supposed to be long</nobr></
td><td>Fred</td></tr>
<tr><td>Bill</td><td colspan=2><nobr>More long text goes here</nobr></
td></tr>
<tr><td>Joe</td><td colspan=2><nobr>Still more long text</nobr></td></
tr>
</table>

The short version of the question is how can I prop this
up (within the table framework)? I thought to put
style='width:1%' on the shortie elements. This resulted in
a very wide table in IE, so after adding the same
style='width:1%' (HTML shown below) to the table element
I get more or less what I was after.

However, in my FF I get an incredibly narrow middle column
(which is to say that the outer columns are too wide) and even
setting specific widths on the left and rightmost columns
doesn't seem to alter this implied middle width. Is there
anyway I can shore up the FF display?
It's undefined and complicated how widths are distributed across spanned
columns, so I'm not surprised you're getting different results in
different browsers.

You could use three tables, with one row and two cells in each. Set the
short one to width: 1px (it will get its content minimum width).
Jul 1 '08 #4

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

Similar topics

179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
1
by: VB Programmer | last post by:
I have a datagrid which is bound to a datatable that I create on the fly. How do I set the width of each column via code? Ex: Column 1 is always 100, Column 2 is always 250, etc... Thanks!
0
by: Reza Nabi | last post by:
Dear All: Banckgroud: I have a datagrid which lives inside a repeater. Which is working fine. What i need is to dyanamically set the column width of the grid (which lieves inside the repeater)....
2
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
1
by: chr.aleksander | last post by:
Hey, I need a solution to two problems: #1 I use a three column layout, where the right and left columns are 150px wide and floated. The center column is not floated, with margins 150px on each...
8
by: hussain123 | last post by:
Hi List, I am having two table one after the another.Even after setting the column width of both the tables the column takes the width of the data in that column. Ideally I want both the table's...
31
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would...
2
by: xtian | last post by:
Hi, I have been having some trouble with getting a column to be a fixed width. I have a table with 11 columns, so it doesn't all fit in a normal browser window. One of the cells has a "?" and then...
1
by: RichardR | last post by:
I have a webpage which has a table that contains a column with several drop down boxes (<SELECT>). The contents of the drop down boxes are dynamically populated so I have no idea what the actually...
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...
1
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
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.