View Full Version : How to Position Light Box Image to left.
apach3dan
06-27-2012, 03:55 AM
1) Lightbox image viewer:
2) http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm:
3) Describe problem: My client wants the image that pops up to shift more to the left of the screen. How do I do this?
jscheuer1
06-27-2012, 05:51 AM
With that particular version of lightbox, using a text only editor like NotePad, you can add (highlighted) to the lightbox.css:
#lightbox{
background-color:#eee;
padding: 10px;
border-bottom: 2px solid #666;
border-right: 2px solid #666;
margin-left: -60px;
}
#lightboxDetails{
font-size: 0.8em;
paddi . . .
bernie1227
06-27-2012, 05:51 AM
1) Lightbox image viewer:
2) http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm:
3) Describe problem: My client wants the image that pops up to shift more to the left of the screen. How do I do this?
So the positioning is actually defined in the JavaScript rather then the CSS, in the variables called:
varlightboxTop
varlightboxLeft
Their about half way down the script file, so these are what are controlling the positioning.
Bernie
jscheuer1
06-27-2012, 06:46 AM
So the positioning is actually defined in the JavaScript rather then the CSS, in the variables called:
varlightboxTop
varlightboxLeft
Their about half way down the script file, so these are what are controlling the positioning.
Bernie
That's wrong. There are no variables by those names. There are:
lightboxTop
lightboxLeft
And those could be used.
But the css method also works and is far easier to deal with:
With that particular version of lightbox, using a text only editor like NotePad, you can add (highlighted) to the lightbox.css:
#lightbox{
background-color:#eee;
padding: 10px;
border-bottom: 2px solid #666;
border-right: 2px solid #666;
margin-left: -60px;
}
#lightboxDetails{
font-size: 0.8em;
paddi . . .
bernie1227
06-27-2012, 06:52 AM
That's wrong. There are no variables by those names. There are:
lightboxTop
lightboxLeft
And those could be used.
But the css method also works and is far easier to deal with.
Right now, i am looking at those two variables on the JavaScript sheet, so I'm pretty sure they exist. And yes, the CSS probably would be easier.
Bernie
bernie1227
06-27-2012, 08:58 AM
My mistake and apologys John, it seemed I made the mistake of not reading what I wrote. You were exactly right, I meant:
var lightboxTop
var lightboxLeft
Very sorry for the confusions, I was just trying to say that the original so.urce of the positioning was in those variables in the JavaScript.
Apologies,
Bernie
apach3dan
06-27-2012, 02:02 PM
Great. Works great! Thanks, guys!
:)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.