开发者

how to place an div tag for datalist control

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 sh开发者_运维技巧ow the 3,4 5 row of the datalist control

does anyone know the css how to fix this issue

thank you


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

#myDiv {
  height: 300px;
  overflow: auto;
}


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜