This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to correctly align two tables? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to correctly align two tables?" Watch "how to correctly align two tables?" New topic

how to correctly align two tables?

rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
If I have two tables. One table contains
a textbox, dropdowns, etc, for search; another table will
display search results.
I want to display these two tables cleanly, I want search table
occupy 20% of browser space, and results table occupy 80% of browser
space. How can I do it?
If I do something like the following:
<table width="20%">
search criteria here...
<table width="80%">
results here...
The first table will occupy normal browser space, second table occupies
the same space as the first does, this makes browser space doubled and ugly.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Try this:

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
I recommend that you use CSS for a two column layout.
This should help:
I agree. Here's the link:
subject: how to correctly align two tables?
Similar Threads
serve html
Display a JSP include in a textarea
Auto resizing iframe upon window resize
How to make a HTML TABLE's column size fixed
setting width in panelGroup, panelGrid