2 tables, side by side?

S

Steve Grosz

Is it possible to have 2 tables, that in combination take
up 100% of the screen, be side by side?

I've tried, and each time I add a table, it adds a hard
return and puts the 2nd table on the next line down. I
can't get them to line up correctly?

Thanks,
Steve
 
K

Kevin Spencer

The reason tables are used for layout in HTML documents is that the default
behavior for a block element, such as a table, is to put it on a line by
itself. By using tables, you can position items side-by-side, simply by
putting them in 2 adjoining cells of the same table. So, it shouldn't be
hard to conclude that putting your 2 tables into 2 adjoining cells of
another table would have the desired effect.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
M

Murray

Nest them in the adjacent cells of a 2 column, 1 row table. Set your
cellspacing, cellpadding, and borders to zero. Make each table 100% width.
 
J

Jim Buyens

First create a two-column, one row table 100% wide. Then,
inside each cell, add another table.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
M

Murray

Wow - unanimity!

--
Murray

Jim Buyens said:
First create a two-column, one row table 100% wide. Then,
inside each cell, add another table.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
S

Steve Grosz

Ok, so I created the table. 3 columns, 1 row. I wanted
a blank space between colums 1 & 3. In column 3, I added
a new table. That worked fine.

In column 1, I split the cell, and set it to a fixed
height with a colored background. The problem is when I
preview it, the fixed cell isn't fixed size anymore. I
have tried setting with both percentages and fixed
height. How can I get it to stay the same size I set it?

Thanks,
Steve
 
R

Rick Budde

The cell sizes are utimately determined by the content
you place in them. That being said, you could create a
transparent graphic (.gif file) in your favorite graphics
program that is the fixed size you desire. Then insert it
into the fixed cell.
 
S

Steve Grosz

Ok, based on that example, if you wanted to have the
green and blue cells different sizes, is that going to
cause a problem?

Steve
 
T

Thomas A. Rowe

Are you talking about height wise? If yes, no problem, just set the height.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
M

Murray

Which (other than CSS) is the only way to accurately control a MINIMUM
dimension on a cell. There is no way to control the maximum dimension,
which will grow to fit its contents (assuming contents are images or other
fixed width elements).
 
M

Murray

Table height is invalid HTML, however, so if your page has a valid doctype
you may see no impact from this change.
 
T

Thomas A. Rowe

Actually, I was talking about setting the cell height, not table height and should have indicated it
as such.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Top