How to change the position of shadowbox

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change the position of shadowbox

kasraa
Hello everyone,

I am new by using shadowbox.
would you please someone help me to change the position of  the shadow box from center of screen to the custom position.

Waiting for your replies.

Thanks
kasraa

Reply | Threaded
Open this post in threaded view
|

Re: How to change the position of shadowbox

no64
me too, absolutely new....

but, I think you can manage that if you make some changes to the CSS file.
Go to:

#shadowbox and change the margin to the desired position, like:

#shadowbox  {
font-family: "Lucida Grande", Tahoma, sans-serif;
background-color: #000;
text-align: left;
visibility: hidden;
display: none;
margin: 0 auto;
padding: 5px;
position: relative;
border: solid 1px #333
}

to:

#shadowbox  {
font-family: "Lucida Grande", Tahoma, sans-serif;
background-color: #000;
text-align: left;
visibility: hidden;
display: none;
margin: 20px 30px 40px 100px; 
padding: 5px;
position: relative;
border: solid 1px #333
}

it is top(20px) right(30px) bottom(40px) left(100px)

or you are changing the "position" to "absolute" and set an absolute position

#shadowbox  {
font-family: "Lucida Grande", Tahoma, sans-serif;
background-color: #000;
text-align: left;
visibility: hidden;
display: none;
margin: 0 auto;
padding: 5px;
position: absolute; top: 100px; left: 200px; 
border: solid 1px #333 }
Reply | Threaded
Open this post in threaded view
|

Re: How to change the position of shadowbox

djmarkert
The workaround suggested for making the change to the CSS file works but places the shadowbox in an absolute position with respect to the top left corner of the browser window.

How would you position the shadowbox in an absolute position relative to the current position of some other element on the screen?
Reply | Threaded
Open this post in threaded view
|

Re: How to change the position of shadowbox

no64
yes, that is a problem... I would like to have that too.... centering horizontally but possibility to change the space to the top.

I think Shadowbox need an additional div surrounding to be able to set some margin or padding to the top.

Maybe this would be some feature in the next version... I would like to have it

otherwise a hack in the js file would be an option... I haven't had a look at it yet.