开发者

ASP.Net Page Content with Scrollbars

开发者 https://www.devze.com 2022-12-13 22:28 出处:网络
I have a nice design for a webpage and in the middle is a contentplaceholder. Now开发者_如何学C I want that, if the content is longer then the height in the div, it should be have his own scroll bars,

I have a nice design for a webpage and in the middle is a contentplaceholder. Now开发者_如何学C I want that, if the content is longer then the height in the div, it should be have his own scroll bars, like IFrames.

How to realize?


Here is an example of a div with scroll bars. Put a div like that inside your content place holder :

<div style="height:100px;width:100px;overflow:scroll;">
    Your content here.
</div>


You could do something like this:

<style type="text/css">
#content
{
    width: 600px;
    height: 400px;
    overflow: auto;
    overflow-y: hidden;
}
</style>
<div id="content">
</div>

This code would show only the horizontal scrollbar, you want both of then, just remove the overflow-y line.

0

精彩评论

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

关注公众号