• 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

display area problem

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic