开发者

Absolute positioning and scroll into view

I have spent hours trying to get my head around a piece of code I am trying to write...

The view and example, please go to http://skateb开发者_Go百科oardingphoto.co.uk/skate-photos-june-2011/chet-childress-rules-are-there-to-be-broken-dude

The element is hidden (as this is a like site), so in your firebug or equivalent, please remove the style 'display: none;' from;

<div id="thumb-nav-area" style="display: none;">

(pretty close to the bottom of the page.

The function is as it should be - when the grey bar is clicked, the extra navigation moves into sight and then back out when clicked again.

However, it seems to be pulling in the page scrolling and expanding the page - I am sure it is a very simple fix and I am probably looking right at it, but can't figure it out!


The problem is you set your tumbnail area to the very bottom (bottom:0px;) and the jquery changes it to margin-bottom:-93px; So in order to fix this you need to change bottom to 93px;

So

#thumb-nav-area {
    // what ever
    bottom: 93px;
    // what ever
}


What an idiot - the reason it doesn't work is because i should be using fixed positioning, rather than absolute... i knew it would be obvious!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜