开发者

CSS, HTML: What's the best way to add space to the inside of a scrollable element?

开发者 https://www.devze.com 2023-01-26 13:37 出处:网络
Both horizontally and vertically? I am using jquery ui\'s draggable feature constrained within a div, and I need a large internal area开发者_运维问答 to work with.Use padding on the scrollable elemen

Both horizontally and vertically?

I am using jquery ui's draggable feature constrained within a div, and I need a large internal area开发者_运维问答 to work with.


Use padding on the scrollable element and then use margin's on the children.


Padding is what you are looking for. Here's a little guide to using it. http://www.w3schools.com/css/css_padding.asp

There is also a guide to the "box model" which will come in handy learning how margins, borders, padding etc. effect a element. It's on the left navigation panel of the link above (I can't post 2 links)

0

精彩评论

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