Hope this is what you are looking for:
http://jsfiddle.net/CjV6k/1/
CSS:
#scrollFrameWrap { width: 400px; margin: 20px auto; background: #000; border-radius: 8px; box-shadow: 0px 1px 15px 0 #fff inset; padding: 3px 10px 10px; } .title { text-align: center; font-size: 12px; color: #aaa; } #parentElement { height: 150px; padding-bottom: 10px; margin-bottom:10px; } #scrollFrame { width: 380px; height: 100%; overflow: scroll; overflow-x: hidden; background: #fff; border-radius: 4px; padding: 10px; }
HTML:
<div id="scrollFrameWrap"> <p class="title">Title</p> <div id="parentElement"> <div id="scrollFrame"> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> <p>This is a sentence, hope you like it.</p> </div> </div> </div>
See if it helps
source share