Getting a table to size correctly.

D

Domestos

Hi,

I am having problems sizing a table correctly.

I have a three column table. Column 1 and 3 need to be 200 pixels in width
fixed, and column 2 (the middle one) needs to be expandable to fill the
window, no matter what size it is. Whether they be working on a 800x600
window or a 1280x1024 window.

The full table width should be no less than 800 (i.e 200+600+200) therefore
column two need to expand so the table fills the window, but does disband
below 600 in width.

I have thought about using a transparent filler image set at 1 pixel high by
600 wide at the top of the middle column, but is there another way round
this? Could CSS do the trick? or is thier some HTML code that can help me
out?

Here is the code I have so far...

<html>
<head>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="1" height="400" width="100%">
<tr>
<td width="200">a</td>
<td width="600">b</td>
<td width="200">c</td>
</tr>
</table>
</body>
</html>

As you can see, at full screen they all seem to be about right, but all 3
columns seem to get squashed when you make the window smaller...

Any ideas?
 
B

Barbara de Zoete

I am having problems sizing a table correctly.

You wouldn't have to. If you set no dimensions, the table will adjust to
what is necessary to display the data properly.
I have a three column table. Column 1 and 3 need to be 200 pixels in
width
fixed, and column 2 (the middle one) needs to be expandable to fill the
window, no matter what size it is. Whether they be working on a 800x600
window or a 1280x1024 window.

The full table width should be no less than 800 (i.e 200+600+200)
therefore
column two need to expand so the table fills the window, but does disband
below 600 in width.

[ snip ]
Any ideas?

Sounds very mucht like you're abusing this table for layout purposes. And
while doing that, setting up for a fixed width design too. Don't do that,
neither of them.

<URL:http://www.google.com/search?q=tableless+design>
<URL:http://www.google.com/search?q=liquid+design>

Done properly, this problem goes away.
 
N

Neredbojias

To further the education of mankind, "Domestos"
Hi,

I am having problems sizing a table correctly.

I have a three column table. Column 1 and 3 need to be 200 pixels in
width fixed, and column 2 (the middle one) needs to be expandable to
fill the window, no matter what size it is. Whether they be working on
a 800x600 window or a 1280x1024 window.

The full table width should be no less than 800 (i.e 200+600+200)

Do you see the error in the line above?

You could try this in css:

table {
min-width:1000px;
}

but any design with a fixed-width 1000px anything is bogus.
 
D

Domestos

The full table width should be no less than 800 (i.e 200+600+200)
Do you see the error in the line above?

okay - maths was never my strong point :) no less than 800 (i.e.
200+400+200)
 
T

Travis Newbury

Barbara said:
You wouldn't have to. If you set no dimensions, the table will adjust to
what is necessary to display the data properly.

So the table gets to decide how to display the data properly? Me think
not. I shall decide what the proper way to display the data is.
Sounds very mucht like you're abusing this table for layout purposes. And
while doing that, setting up for a fixed width design too. Don't do that,
neither of them.

Unless it fits the design of your site, then by all means do them.
Until css can duplicate the "grid" tables give designers, they will
continue to use tables.
 
M

mbstevens

Domestos said:
The full table width should be no less than 800 (i.e 200+600+200)

Which is wider than many people's browser window, so these people
get either a horizontal scroll bar (irritating for the visitor)
or other odd realignment problems. Web pages don't work right
when they are designed like magazine pages.

Try setting the widths to percentages of the enclosing object with CSS.
If this won't work for you, you are probably trying to cram too much
information onto a single page width. Push some of the info to subpages
so that things don't have to be so pixel perfect. Relaaaaaaaaaaaaaax.
 
D

Domestos

mbstevens said:
Which is wider than many people's browser window, so these people
get either a horizontal scroll bar (irritating for the visitor)
or other odd realignment problems. Web pages don't work right
when they are designed like magazine pages.

Try setting the widths to percentages of the enclosing object with CSS.
If this won't work for you, you are probably trying to cram too much
information onto a single page width. Push some of the info to subpages
so that things don't have to be so pixel perfect. Relaaaaaaaaaaaaaax.

Well really what I am trying to do is have two outside columns that are
fixed at 200 each. then the middle column adjusts so visitors do not get the
horizontal scroll bar!

i.e on a...

800x640 screen. Middle column is 400
1024x768 screen. Middle column is 624
etc...

However if they resize the window width down below 800 I want the middle
column to stay at 400 thus making a 800 wide screen...

200+400+200=800.

I am doubting (bar the phone and PDA surfers) uses anything less than 800
width now-a-days and even If they do the market for my webpage will not
interest them in the slightest. My market is all about higher resolution and
improved graphics...

Still looking for help on this...
TIA
 
D

Domestos

Okay,

Its not somthing I wanted to do but I have decided to use a spacer row using
a transparent gif as the first row in my columns. This gives the results as
expected... and will do for now unless somebody can come up with a better
solution or a serious reason why I should not use them... i.e. 'firefox dies
because you do this...'

<html>
<head>
</head>
<body>
<center>
<table cellspacing="0" cellpadding="0" border="1" height="1">
<tr>
<td><img src="spacer.gif" height="1" width="150"></td>
<td width="100%"><img src="spacer.gif" height="1" width="500"></td>
<td><img src="spacer.gif" height="1" width="150"></td>
</tr>
</table>
</center>
</body>
</html>
 
J

Jose

I am doubting (bar the phone and PDA surfers) uses anything less than 800
width now-a-days and even If they do the market for my webpage will not
interest them in the slightest. My market is all about higher resolution and
improved graphics...

Just because a visitor has a zillion pixels doesn't mean they want to
give them to you. People have big screens for many reasons, among them
that they can do several things at once. If your page requires too much
of their screen, they may find it too inconvenient to bother with, even
if they are in the market for your information. Busy people are like that.

Jose
 
P

pecan

Domestos said:
Okay,

Its not somthing I wanted to do but I have decided to use a spacer row using
a transparent gif as the first row in my columns. This gives the results as
expected... and will do for now unless somebody can come up with a better
solution or a serious reason why I should not use them... i.e. 'firefox dies
because you do this...'

<html>
<head>
</head>
<body>
<center>
<table cellspacing="0" cellpadding="0" border="1" height="1">
<tr>
<td><img src="spacer.gif" height="1" width="150"></td>
<td width="100%"><img src="spacer.gif" height="1" width="500"></td>
<td><img src="spacer.gif" height="1" width="150"></td>
</tr>
</table>
</center>
</body>
</html>

If you just leave the width out of the centre block, then it defaults to the
remainder of the page.

<html>
<head>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="1" height="400" width="100%">
<tr>
<td width="200" >a</td>
<td>b</td>
<td width="200">c</td>
</tr>
</table>
</body>
</html>

Not sure how good it is, but it works.

Catherine
 
D

Domestos

Just because a visitor has a zillion pixels doesn't mean they want to
give them to you. People have big screens for many reasons, among them
that they can do several things at once. If your page requires too much
of their screen, they may find it too inconvenient to bother with, even if
they are in the market for your information. Busy people are like that.

This is exactly my point...

My html allows the middle column to expand to the width of the explorer
window automatically no matter what width it is dragged too, but it limits
the screen size to a minimum of 800 in width for all columns. However I
needed 200 for each of the columns to each side hence my design...

In my experience people tend to maximise everything anyway and ALT-TAB
between windows, not cascade windows all over the screen.

I cannot accomidate everybodys surfing style... But I will comprimise to a
minimum, and that is usually 800x600.

I think web designers often bend over too much for thier viewers pleasure.
If your page holds information that a person wants they will wade through
high water to get to it. Where on the other hand if someone is casually
browsing through your site, they proabably wont even be thinking about the
design and slight awkwardness of the page, unless of course it is totally
unusable...

Discuss...
 
B

Blinky the Shark

Domestos said:
In my experience people tend to maximise everything anyway and ALT-TAB
between windows, not cascade windows all over the screen.

If those are the only ways of running and organizing apps that you've
seen, then your expreience is rather narrow. I never do either of those
things on my online desktop.
 
R

Richard Rundle

Domestos said:
This is exactly my point...

My html allows the middle column to expand to the width of the explorer
window automatically no matter what width it is dragged too, but it limits
the screen size to a minimum of 800 in width for all columns. However I
needed 200 for each of the columns to each side hence my design...

In my experience people tend to maximise everything anyway and ALT-TAB
between windows, not cascade windows all over the screen.

I cannot accomidate everybodys surfing style... But I will comprimise to a
minimum, and that is usually 800x600.

I think web designers often bend over too much for thier viewers pleasure.
If your page holds information that a person wants they will wade through
high water to get to it. Where on the other hand if someone is casually
browsing through your site, they proabably wont even be thinking about the
design and slight awkwardness of the page, unless of course it is totally
unusable...

Discuss...
I don't think you'd last five minutes in the real business world with that
attitude.
 
M

Mark Parnell

Deciding to do something for the good of humanity, Domestos
a serious reason why I should not use them... i.e. 'firefox dies
because you do this...'

A kitten dies because you do this...
 
M

Mark Parnell

Deciding to do something for the good of humanity, Domestos
My html allows the middle column to expand to the width of the explorer
window

IE isn't the only browser.
automatically no matter what width it is dragged too, but it limits
the screen size to a minimum of 800 in width for all columns.

You're starting from a wrong premise. Tables are meant for tabular data,
not page layout.
However I
needed 200 for each of the columns to each side hence my design...

You are putting 200px wide images in both outer columns?
I cannot accomidate everybodys surfing style...

The rest of us can, why can't you?
I think web designers often bend over too much for thier viewers pleasure.

The web is fluid by nature. You have to try hard to make it inflexible.
 
D

Domestos

I don't think you'd last five minutes in the real business world with that
attitude.

You are absolutly correct. I am not trying to create a premise, more trying
to find out the correct way of doing things. Many of you out thier will hold
years of design and development on myself - that is why I state what I am
trying to do and am open to use better options. So far nobody seems to have
given a solution or suggestion for my requirement. I do not have the
experience of others, hence I have asked in here what is best and to discuss
why my way is not the right way.

My writing style can often come across as blunt and carefree, I apolagise
for that - it is not intended. In my views I am trying to make a statement
that I felt was true. I do feel often that web developers are restricted in
thier design and approach justto meet a particular standard or requirement.
I am not trying to start a rebellion...

Domestos
 
D

Domestos

You're starting from a wrong premise. Tables are meant for tabular data,
not page layout.

So how do i create a page, not using tables, that creates two outside
columns that are fixed width (200 each) and a central column that expands to
meet the size (width) of the browser, but is a minimum width of 400?

I have put forward the way I would do it (using tables) - now I am open to
suggestions on a better way that meets all browser specifications and
standards...

Domestos
 
D

Domestos

I never do either of those things on my online desktop.

So how do you browse then...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top