Why can't I make a table cell any size I want?

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I am trying to figure out how to do page layouts using tables (obviously not
my background). If I have, say, a 5x5 table defaulting to20px wide per cell,
why can't I make the cell in, for example, (3,1) 10 px wide? It seems to
want to use the widest cell in a column... i.e. 20px. Also, if I make any of
the cells greater than 20, all the rest in a column default to the same
larger width.

It seems that each row's cells should be rendered independant of other rows.
 
Bill,

HTML specifications call for table cells to all be the same width as the
widest column in a table.

To do what you want create each row in a separate table.

Stack the tables and you'll have the result you want. You will probably want
to look into cascading style sheet commands to manipulate each tables
borders.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
Tables are intended to present tabular data, and as such, one would expect
that a column would be the same size for the entire table. They are not, and
never were, meant for laying out the graphical appearance of a page. To do
that you should use CSS (look at float) and the div and span tags.

Colin
 
Colin Young said:
Tables are intended to present tabular data, and as such, one would expect
that a column would be the same size for the entire table. They are not, and
never were, meant for laying out the graphical appearance of a page. To do
that you should use CSS (look at float) and the div and span tags.

I'm a little confused. Visual Studio supports two modes in the designer --
grid and flow. From what I understand, grid-mode uses CSS for layout but it
seems the consenses is to NOT use this.

So, if I use flow don't I then need to use tables for page layout?
 
Yes. Visual Studio does support two design modes, and to be honest, neither
is really a good example of good HTML or CSS, although the grid mode is
probably the more offensive of the two. All it means is that you will need
to get your hands dirty with the HTML rather than relying on VS to do the
layout for you. You could use tables, but based on what you are trying to do
it sounds like doing it the right way is the easier option (just in case
doing it right isn't incentive enough on its own). Unfortunately VS seems to
have inherited the HTML WYSIWYG designer from FrontPage and it quite
frequently does things that are not only very messy, but actually in
violation of the standards.

For a fine example of layout without tables, see http://glish.com/css/.
There are links there to other sites that have much more information about
how to effectively use CSS.

Using tables for layout is so 1997...

Colin
 
Thanks for the recommendations.

I must say that I am dissapointed to hear that the VS designer is not up to
speed and that I will have to handcode the HTML. It's not that I am against
doing this, but it does strike me that needing to is really the equivilent
of handcoding a Word document in Notepad... complete with tags and
stylesheets. Or writing applications in assembler rather than a higher level
language.

I'm wondering why Microsoft (or SOMEONE) can't put together a decent visual
designer for Visual Studio.
 
BTW... your link is intriguing.

I also have a need to support templates. Is there any good info on the best
way to usee the CSS approacth and templating?
 
Back
Top