tags:

views:

124

answers:

3

hi. i have a datalist control where i displaying images have (6 colums * 5 rows) . right now i am showing entire thing in a page. but i need to fix the height to 300px . and do the scrolling thing so that i can show the 3,4 5 row of the datalist control

does anyone know the css how to fix this issue

thank you

A: 

put your datalist in div

<div style="height: 300px; overflow:auto;">
        <asp:DataList ID="DataList1" runat="server">
        </asp:DataList>
    </div>
Muhammad Akhtar
i have an scrool image: which is an ARROW type image. i need to embed that image for the scroll. how to solve this issue thanks for the replay
prince23
A: 

Assuming the wrapping <div> element has the id myDiv:

#myDiv {
  height: 300px;
  overflow: auto;
}
Jørn Schou-Rode
i have an scrool image: which is an ARROW type image. i need to embed that image for the scroll. how to solve this issue thanks for the replay
prince23
Sounds to me like you want some kind of custom/virtual scrollbar. Personally, I would prefer a standard scrollbar, but if you really want to change it: http://www.hesido.com/web.php?page=customscrollbar
Jørn Schou-Rode
A: 

Off the top of my head, I'd wrap a div around your images, and set the height in the style element of that div to 300px. Then set the overflow (also in the style element) to scroll

<div style="height: 300px; overflow: auto">
... your images
</div>

edited following jorn's comment.

adrianos
`overflow: scroll` will put scrollbars in both directions, even if they are not needed, right?
Jørn Schou-Rode
yeah i'll buy that, auto is a better option here.
adrianos
thanks for the replay adrianos can u show write the css how to do it. as i am new in css. where i need to get my scrol image thank you
prince23
Not sure what you mean by scroll image.If you mean the scroll bar for the div, 'overflow: auto' will automatically add it when the content of the div (your images) is greater than 300px.
adrianos