• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Positioning the column in the table

 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found the solution: <col width="0*">



 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic