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

avoid horizontal scrolling in the web page

 
Raji Sriram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a JSP page where I have a table.
If the column text is big, the table grows and I would have to scroll horizontally to see the full page.
When declaring the table, I am giving as table width=100%. I thought this would help; but no.. I still am not able to see the full table.
How can I avoid this? Please advise.
Thanks for listening.
Regards,
Raji.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try setting the table to 95% or set it to a hard coded value for a width.
Are you assigning any information to the cells for width? There might be problems with the length of the text if it does not have breaks.
Eric
 
Raji Sriram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. I am not assigning width for cells. I have a column whose length will widely vary.
Regards,
Raji
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if they dont fit, they don't fit.
I mean, you can even get the browser width and use document.writeln to print a table tag with width set in pixels, but if the summ of columns width is bigger than browser your only choice to wrap/cut values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic