user1623834
user1623834

Reputation:

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

Upvotes: 4

Views: 13443

Answers (1)

KDaker
KDaker

Reputation: 5909

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/

Upvotes: 3

Related Questions