Lost Password
Create an Account

Your username must be unique, and cannot be changed later.

We use your email address to email you a secure password and verify your account.

Margin & Scroller

HomeForumsWink uiMargin & Scroller

Tagged: ,

This topic has 2 voices, contains 1 reply, and was last updated by  sylvain 668 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
July 27, 2011 at 8:51 am #link

Hi,

I noticed that if the scrollContent has some margins, those are not taken in account by the scroller: one cannot scroll to the very bottom of the content.

(add margin:100px in #scrollContent in the test_scroller.html for example).

I was wondering if it was the intended behavior.

July 27, 2011 at 1:22 pm #link

Hi,

it’s right, margin is not taken in account by the scroller: the scroller uses the offsetHeight property of the node which is the height of the visible area for an html element; this value is used to determine the scrollable area.

The margin makes sense only if you want to shift an element; but since the wrapper and the content are related by the scroller component, you must apply the margin to the wrapper element (and subtract it in the wrapper height calculation).

If you want that the scrollbar goes on the margin area, you have two alternatives:
– use the padding property
– insert an empty block element at the top of the content (with the appropriate height)

Good luck!

Sylvain

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.