Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Positioning the column in the table

 
Ismael Upright
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a table with 2 columns. I want:
- make the table to fill all possible width
- text in second column not to be wrapped
- second column to have the width equal to width of the longest text line inside this column

Everything without scripts and CSS, just plain old HTML

Is it possible to do?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried? And why the rather odd "no CSS" directive?
 
Ismael Upright
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I know how to make a table with width to the screen size, the problem is how to make the second column to behave as I want.

I'll try to draw it:

Mr---------------------------------------------------------------------------------------Mrs-----
John Doe--------------------------------------------------------------------------------Jane Doe
Washington------------------------------------------------------------------------------Paris----
USA-------------------------------------------------------------------------------------UE------


Text in second column is to be aligned to the left (at least I tried...), but the column itself is supposed to be on the right side of the screen.
The width of the second column is to be equal to the widest text line contained in it (which is "Jane Doe").
The table is supposed to have the screen width.


Why "no CSS" well... long story short - it is supposed to be a HTML document builder, where you give the small pieces of document (like "John Doe personal data piece" and "Jane Doe personal data piece") and receive a complete document. One of the assumptions is "no CSS" directive
 
Ismael Upright
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found the solution: <col width="0*">



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic