GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes avoid horizontal scrolling in the web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "avoid horizontal scrolling in the web page" Watch "avoid horizontal scrolling in the web page" New topic
Author

avoid horizontal scrolling in the web page

Raji Sriram
Greenhorn

Joined: Dec 05, 2003
Posts: 9
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Dec 05, 2003
Posts: 9
No. I am not assigning width for cells. I have a column whose length will widely vary.
Regards,
Raji
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
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.
 
GeeCON Prague 2014
 
subject: avoid horizontal scrolling in the web page