开发者

jSrcoller always sticks my div to top

I am using jScroller to show a marquee.. It works fine but it always sticks my div to top of the page rather than the exact position of the div....

<div id="CaptDiv"> // this div is at the centre of my page
    <div id="Ca开发者_如何学JAVAptionDiv" class="captiontext">
        Find your Leads to Precede and Predate
    </div>
</div>

and i have applied this css only...

.captiontext
{
 font-weight:bold; color:#69442f;
 font-family: Arial,Helvetica,sans-serif; font-size:105%;margin-left:70px;
}

and my jquery,

     $(document).ready(function() {
        $jScroller.add("#CaptDiv", "#CaptionDiv", "right", 1);
        $jScroller.start();
    });

alt text http://img409.imageshack.us/img409/985/marquee.jpg


Try adding position: relative to div that contains the scroller. I would imagine JsScroller is adding position: absolute to the scroller div and the scroller div has no positioned parent. The scroller div is therfore positioned absolutely in relation to the body element

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜