Closed (works as designed)
Project:
Lightbox2
Version:
6.x-1.9
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 May 2010 at 03:27 UTC
Updated:
6 Jul 2015 at 03:19 UTC
Jump to comment: Most recent
Comments
Comment #1
leenwebb commentedI would also love to have the close button in the top right -- Does anyone have any tips? Thanks!
Comment #2
vinmassaro commentedSubscribing, would like to know if this is possible as well. I wasn't able to change the position with CSS because the close button container is not inside the same container as the lightbox content, and the lightbox container div holding everything is set to position:absolute, so the close button cannot be absolutely positioned relative to it.
Comment #3
hefox commentedSubscribe, wasn't able to do figure a way either. Found an old issue (then lost it) from 2008 that maintainer suggested changing the module css and js file to do it, witch I'm loath to do.
Comment #4
hefox commentedAdd to a js file in theme like any other theme js file
Comment #5
SWMdave commentedI can not get it to work-
I have the most up to date version of Lightbox2, and jquery update module enabled just in case.
I added this to page.tpl.php:
I also created a file called :
top-box-buttons.js
In that file All I have:
It's not working for me
Comment #6
hefox commentederr, it needs to run after lightbox, my guess is you added that before $scripts variable?
Anyhow, you can add a js file via your .info file (visit admin/build/themes to refresh your theme info -- just visiting the page will refresh it). May need to clear cache.
Comment #7
SWMdave commentedI added that after-
I since removed it and added;
scripts[] = top-box-buttons.js
to my themes .info file.
Cleared the theme registry and still no buttons.
Comment #8
waldbeek commentedFor me the JS solution did not work. But i managed to put the close button to the top via css.
#bottomNavClose {
position: absolute;
top: 0;
margin-left: 540px;
text-align: right;
margin-top: 2px;
padding: 0;
float: none;
}
Comment #9
krishnaa commentedHi hefox,
you solution worked fantastically for me !!!
Cheers!!!
Comment #10
stella commentedOr why not use the alternative layout which puts the X in the top right corner.
Comment #11
shaneonabike commentedCould we update the documentation (below the alternative checkbox to indicate what it does). When I first saw this I didn't realise it meant that the X would appear at the top and thus didn't use that option. But it was exactly what I wanted in the end :/
Comment #12
Ritty commentedCould you provide me the proper CSS coding to place the "X" at the top for the updated lightbox sheet? Here's the default script:
.lb-data .lb-close {
width: 35px;
float: right;
padding-bottom: 0.7em;
outline: none;
Thank you.
Comment #13
muhammad.tanweer commentedThis solution worked. You just need to check the checkbox saying "user alternative layout" and the close icon shows on top rather than on bottom. Thanks.
Muhammad.
www.app-desk.com
Comment #14
CaraCaraWatcher commentedI too am trying to get lightbox2 to display its title and close box on top.
Although I've tried hard, I've not succeeded it pulling this off.
I've downloaded lightbox2 and it works great but would someone mind telling me how I can get to the point to select "use alternative layout"?
Thanks all! Glenn
Comment #15
acbramley commentedThe Use alternative layout option is on the configuration page under /admin/config/user-interface/lightbox2