Reputation: 15138
I have a nice design for a webpage and in the middle is a contentplaceholder. Now 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?
Upvotes: 2
Views: 13445
Reputation: 6059
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.
Upvotes: 0
Reputation: 48088
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>
Upvotes: 3