2 tables, side by side?

  • Thread starter Thread starter Steve Grosz
  • Start date Start date
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
 
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.
 
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.
 
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)
|/---------------------------------------------------
*----------------------------------------------------
 
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)
|/---------------------------------------------------
*----------------------------------------------------
 
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
 
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.
 
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
 
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.
==============================================
 
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).
 
Table height is invalid HTML, however, so if your page has a valid doctype
you may see no impact from this change.
 
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.
==============================================
 

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

Back
Top