Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

div scroll with padding?

I am new to html / css and am still learning a few things, currently I am trying to create a simple chat style box as can be seen here:

http://jsfiddle.net/29n3w/

Is there a way to rework this code so that the text inside the div respects the padding and is cut off 9px from the border of the top and bottom instead of getting cut off at the well's border? I'd also like to keep the scrollbar the way it is now.

I've searched for a while but cannot seem to devise a solution to this.

Ideally this is what I am aiming for: http://img839.imageshack.us/img839/3889/examplejt.png


1 Answers

you need to wrap the text in another div and make the new div scrollable. then you put padding to your well..check this out: http://jsfiddle.net/kdaker/La9Jn/7/

like image 111
KDaker Avatar answered Oct 19 '25 22:10

KDaker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!