This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes scrollbars and div tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "scrollbars and div tag" Watch "scrollbars and div tag" New topic

scrollbars and div tag

meera jan

Joined: Aug 30, 2005
Posts: 21
hi all,
Here i will describe my problem.
In a webpage,I have alot of controls.One of them is the selection of countries.For that i have to display all the countries from the database.
In my jsp page i have the countrylist in requestscope.I want to iterate the collection to display it.My problem is,for each item in the list,i have to display a checkbox sothat user can select that country.
Overall,I have to dispaly the list inside a div tag so that each row contains 5 countries and should provide the scrollbars so that user can scroll down the countries for selection.I was able to do that,but scrollbars is not coming.Without scrollbars the total list is displaying and the entire page is getting enlarged.Does anyone got what i am trying to explain?Please suggest any idee to do the same.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
<div style="height:300px;overflow:scroll"></div>

meera jan

Joined: Aug 30, 2005
Posts: 21
to adjust th size of the div to the size of column of the table what should i do?because i am placing the controls as 2 columns in each row.first column is the label and second is the i have to fit the div in the second column of a particular row.Now because of the div,that particular column is getting enlarged.
It is sorta covered in the JavaRanch Style Guide.
subject: scrollbars and div tag
Similar Threads
What's the JSF equivalent of this JSP code?
Calling a new JSP form a Spring Controller using Ajax
Two div tag update on a same time
How to swap out div tags programmatically with JavaScript
Web Application DIV Tag Usage