Saturday, June 2, 2007

#flightGrid {overflow:auto;} [Scrolls the widget]

For displaying flight results I am having a layer that is overflow auto:

#flightGrid {
overflow:auto;
}

So that I can get scroll bars for data grid. But the widget was having problems with this property and that is when content of layer is scrolled to the bottom after there is no content remaining to be displayed the widget scrolls up and goes out side the widget working area hence it would not remain visible.

After searching on internet I found a solution that is, if I fix the position of layout then no matter what happens inside the layout, it will not hold its position exactly as specified.

#layout {
width:400px;
height:200px;
position:fixed;
top:1px;
left:1px;
}

I found this web page useful: http://www.w3schools.com/css/pr_class_position.asp

So finally I could resolve this issue :)

0 comments: