473,230 Members | 1,546 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,230 software developers and data experts.

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 2247
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.