saurabh
saurabh

Reputation: 11

fix the position of fancybox on screen? scroll true?

I want to do a couple of things in fancy box - > I am using it to fire an AJAX function,the recieved content from server, little problem is ->

1. It is not auto scrolling, am getting a scroll and am able to scroll but cannot scroll it using the touchpad.

2. i want to fix the position of it on the screen, it is moving if i scroll the page in backgroung.

Following is some CSS code, help me what to add in it.

width:720px;
height:380px;
float:left;
overflow-y:scroll;

Thanks :)

Upvotes: 1

Views: 7113

Answers (2)

Guern
Guern

Reputation: 1257

It is necessary to set also a top distance, otherwise Fancybox calculates it from the top and if the container is fixed it will go out of the screen.

Furthermore, it is necessary to set it as !important in order to overwrite inline css:

#fancybox-wrap {
    top: 100px !important;
}

Upvotes: 1

Mottie
Mottie

Reputation: 86433

Try adding this to your css

body #fancybox-wrap { position: fixed; }

Upvotes: 3

Related Questions