Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox does not scroll within div tag 1

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I've created a div tag with overflow set to auto. Within the div tag I have several objects (textboxes, labels, etc). I also have a listbox. The height of the div tag is set so that about 1/2 of the information is shown. To see the rest, the user must scroll down. OK so far. But when I scroll, the listbox doesn't scroll with the rest of the information. It remains in its orginal position.

Is there some kind of "trick" to force the listbox to scroll with the rest of the information?

Here's an example of my code:
Code:
<div style="background-color: white; position: relative; float: right; overflow: auto; width: 731px; height: 600px; ">
...
              <SELECT id=MyListBox style="LEFT: 147px; WIDTH: 103px; COLOR: blue; POSITION: absolute; TOP: 8px" > 
                <OPTION value=-1 selected>Select Yes or  No</OPTION> 
                <OPTION value=Y>Yes</OPTION> 
                <OPTION value=N>No</OPTION>
              </SELECT>
...
</div>
 
You're right, IE 6. I tried position: relative. But that didn't seem to work either.
 
Tried it, still didn't work. I also tried placing the listbox within a table. That didn't work either.

Any other suggestions?
 
Now it's time for you to show us the page itself. Failing that, please provide us with all the code. But really, it would be much preferred for you to give us the link to the site (or at least a mock up).

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Vragabond,

Thanks for sticking with me. I mocked up some code to show you, and it worked. So obviously, something was wrong with my original code. Finally narrowed it down to the fact that I had put a Glow Filter in one of my outer div tags. That's what was causing the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top