• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display area problem

 
pavanasree vasireddy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my JSP i have a series of records. I have kept a scroll bar when no of records exceeds that limited display area. Now the issue is if there are no records or very few records that display area is shown as blank. I want the page to be adjusted with the no of records i have. that is if the display area is for 10 records it can be adjusted for 10 records or 2 records and should display a scroll bar if it exceeds 10 records.




Please give me suggestions

Any help is appreciated

Thanks and Regards.

Pavana sree.v
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set it to have a set height:XXXpx and set scroll:auto;

Eric
 
pavanasree vasireddy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the advice.

I have already set it like that ..

I have set the height:150px scroll=auto

This is working fine if i have records to be displayed for the specified height. The case is when we have only one record or two records... the rest of the height specified is displayed as blank ......

I wanted to reduce the height when there are less no of records and fix it to 150px height if there are more no of records and let the users scroll down to see the rest of the records.




Pavana Sree.V
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way to do this with HTML or CSS. You would have to use JavaScript to detect the size.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic