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

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.
 
S

S. Justin Gengo

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
 
C

Colin Young

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
 
B

Bill

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?
 
C

Colin Young

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
 
B

Bill

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.
 
B

Bill

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?
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top