HTML - Help With Lightbox
I am trying to modify the behaviour of an existing html page to use the Lightbox utility rather than opening a new browser window. The trouble is, no matter where in the source code I place the the Lightbox references ie:
<link rel="stylesheet" href="lightbox.css" type="text/css" /> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript" src="scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="lightbox.js"></script> the function does not work. It also stops the behaviour of the sliding tabs. Would some mind taking a look at the attached html and advising me where Im going wrong. p.s. I have tried the lightbox utility in a new page thus: <html> <link rel="stylesheet" href="lightbox.css" type="text/css" /> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript" src="scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="lightbox.js"></script> <body> <a href="pulrosetest.jpg" rel="lightbox"> <img src="pulrose.jpg"> </body> </html> and it works fine. Thanks, Steve Similar TutorialsHi, I want to develop a webpage where I can display the images using LightBox.My question is how to use Lighbox plugin to make that happen.I have not used any tool(Dreamweaver) to design the webpage.I wrote HTML in the notepad. Any help is greatly appriciated. Thanks in advance. I am trying to edit a website. The lightbox images on this page (after popping up) have the "X" and "Close" with the popup: http://www.ryekids.com/patients/treatments/care.php But for the life of me, I cannot get that "X" & "Close" on the office staff lightbox images on this other page: http://www.ryekids.com/office/staff.php Any pointers? Thanks in advance for your help and advice! Hi, I have a load of images I want to appear in a series of lightboxes that look like the attached file. Ignore the blur latin. I just want the red text and to be able to click prev<->next to rotate the images. What do you think the best way to achieve this would be. I have looked at a few lightbox scripts but non will let be format the text the way I need. I am not to worried about the prev/next so long as they are there and the red text does not change so was thinking a HTML template in the lightbox that has the smarts to switch the images when prev/next is clicked. Any ideas welcomed. Cheers, Kevin. Hello everybody. I was wondering if you could help. Firstly I'm a noob to css/html. I've come stuck. I've created a site in illustrator imported into dreamweaver (I know this isn't the right way but it's easier for me at the moment, sort of) and added lightbox 2 to it. It's been smooth sailing and lightbox works great. This is the code I see: (note I've just put the code for the image I want to use) <div align="center"><a href="images/locogsequins copy.jpg"rel="lightbox"><img src="images/index_03.jpg" width="262" height="188" Messy I know , but it's working for me so far. However, on top of having the lightbox effect I would like to add a rollover effect. So when a viewer lands on the page they will see everything in black and white, when they roll over an image it turns to colour. The code I've found is <div><img src="images/locogsequins_bw.jpg" onmouseover="this.src='images/locogsequins copy.jpg'" onmouseout="this.src='images/locogsequins_bw.jpg'"> which works. (I've tested via preview in DW) My question is where do I insert this into the earlier code so they work together? I'd very grateful for any help. Thanks x I am trying to figure out what code goes where (and how much of it, etc!), to add "lightboxes" to my images on my site. The desired "lightbox" effect can be seen when you click the images here- http://shop.vintageacademe.com/produ...r-satin-jacket And I want to add it to my site's images rather than having the viewer directed to a new page, example of my page seen here- http://decadence-fashion.co.uk/item3286.html I have some html knowledge, as my website is under construction, and really am hoping to add the lightbox system to all the pages! Please help! Thank You Hi my lightbox works partially on my website. i've loaded the lightbox on this image <a rel="lightbox" href="http://visualadvice.com/wp-content/uploads/2008/10/happiness_101.jpg"> and simply activated the plug in, in my manager. I didn't add the JS and CSS links at the top of my header in my word press template. on this link it works fine! http://visualadvice.com/?p=271 But on my main page it doesnt work http://visualadvice.com/ so i looked up the code and i saw that the JS and the CSS file links were missing from the main page. so i went on my theme editor and put the link in the header but then where it used to work properly. http://visualadvice.com/?p=271 it had a huge black square at the top. so i looked up the code and the JS and CSS file links were duplicated. and where it didnt work. worked fine http://visualadvice.com/ what i want to know is how to delete the links that are automatically set up, so i can just put one set of links in my header. ive looked up at the plugin editor, would it have to do anything with this code?? function lightbox_wp_head() { global $lightboxpluginpath, $post; $lightboxcolor1 = get_option("lightbox_color1"); $lightboxlb_opacity = get_option("lightbox_lb_opacity"); $lightboxlb_resize = get_option("lightbox_lb_resize"); $lightboxoff = false; $lightboxoffmeta = get_post_meta($post->ID,'lightboxoff',true); if ($lightboxoffmeta == "false") { echo '<script type="text/javascript"> lb_path = "' . $lightboxpluginpath . 'lightbox/"; lb_opacity= "' . $lightboxlb_opacity . '"; lb_resize= "' . $lightboxlb_resize . '";</script>'."\n"; echo '<link rel="stylesheet" type="text/css" media="screen" href="' . $lightboxpluginpath . 'lightbox/css/lightbox.css" />'."\n"; echo '<script type="text/javascript" src="' . $lightboxpluginpath . 'lightbox/js/prototype.js" ></script>'."\n"; echo '<script type="text/javascript" src="' . $lightboxpluginpath . 'lightbox/js/scriptaculous.js?load=effects,builder"></script>'."\n"; echo '<script type="text/javascript" src="' . $lightboxpluginpath . 'lightbox/js/lightbox.js"></script>'."\n"; echo '<style type="text/css">#overlay {background-color:' . $lightboxcolor1 . ';}</style>'."\n"; } } I posted on their support forums but help seems to be thin around there, so I thought I'd give here a try....anybody have any ideas? thanks julien Does anyone know why lightbox images would be displaying in reverse order? The numbers are correct but it pops up on the last one and I have to hit previous to get to the front. Hi I'm not sure if I am posting this in the correct forums, so I'm sorry. I'm trying to setup Lightbox v2.0 fro www.huddletogether.com/projects/lightbox2 on my site however for some reason it doesn't work, I think I'm doing something wrong, so could please someone give me a detailed tutorial on how to set it up. Thank you I'm a rookie so don't be too rough on the mistakes I made in the webby im about to post, but here's my prob http://mythgaming.gethost.nl I got 1 Iframe in the main page, which loads every link I click from the menu Now at the link MEMBERS, if I click it you get a Click here url, this contains a javascript that reopens a menu with a close button and normally an image in it My idea was to open a certain page in that "javascript application" but the problem is when I click "click here" it does open, but in the iframe itself, setting a target _blank doesn't work either as it'll stay in the Iframe So first problem would be, how can I get that javascript to be opened OUTSIDE the frame.. and with that how could I load a page in it -- <link rel="stylesheet" type="text/css" href="style.css" /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="robots" content="all" /> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <title>Myth Academy | Managing system</title> <script type="text/javascript"></script> <style type="text/css" media="all"> @import url(style/style.css); </style> </head> <body> <tr> <td style='width:16px; height:16px;'> </td> <td width="50">Result:</td> <td colspan="3"><a href='http://mythgaming.gethost.nl/members/furian.php' title='Layout' rel='lightbox' target="_blank">Click here</a></td> </tr> </table> <hr size='1' style='color:#000000;' /></div> <div id="footer"> <p>Any questions? Mail ryze@dock-7.com </p> </div> </div> </body> </html> -- As you can see the url above "furian.php" is supposed to load inside the window that pops up if you click Click here.. that's not working, and also the window doesn't pop out from the Iframe but stays in there The actual code is taken from the http://mythgaming.gethost.nl/training/ page.. as you open a Photo there you'll see the normal "image popup" window I hope any of you have a suggestion how to fix this, and yea correct me on dumb mistakes i know I made many I just searched the posts to see if anyone else has had this problem or concern, and no one had a real solution, so I just thought I'd post it again, incase the right person stumbles upon this and has the answer I need! Anyway... onto the question. I have an iframe on my site, and am using lightbox within that iframe, but want the lightbox to open up outside of the iframe... is there anyway that is possible? Thanks in advance! I've created a lightbox, i have it set to 100% height & width, but it only does it for the screen size/browser size and not the website. Basically... lets say 1024x768 is ur screen res, your browser will show about 900px in height. The lightbox covers 900px - but the website has scrollbars and scrolls down to a total of 2000px Is there a simple way to making my lightbox stretch all the way to the bottom without JS? Code: /* MAIN HTML ELEMENTS */ html { xoverflow-y: hidden; width: 100%; height: 100%; } body { margin: auto; padding: 0px; background: #245684; width: 100%; height: 100%; xoverflow-y: hidden; } #microSiteContainer { background: #000000; position: absolute; display: none; z-index: 100; height: 100%; width: 100%; opacity:0.75; filter:alpha(opacity=75); } Hi! Hopefully this has found the right section of the forum. This question has to do with a recent change of web hosting and the sudden stopping of my "lightbox 2". When clicked, the link just stays selected, without showing the image or activating the lightbox. After uploading my site to the new host the lightbox has stopped working. Nothing (root folder, image location, lightbox javascript) has changed from my previous site. With dreamweaver cs3 lightbox is previewing correctly in firefox, but online something is wrong. Any ideas of what this might be? A previous suggestion was to make sure the links were going to the right place, and as far as I can tell they are. As the website was already working fine on another host server. Could it be that the (server) settings somewhere aren't enabling the javascript? Any suggestions on what may be causing this are appreciated. Thanks. Hello everyone, here we go: I've got nice nav bar with js, working perfect (got it at http://net.tutsplus.com/tutorials/de...vigation-menu/ ), now when I try to add rel="lightbox" to images, the lightbox doesn't work ? Here's the html, I'll explain more; HTML Code: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>untitled</title> <link rel="stylesheet" href="css/style.css" type="text/css" /> <!--[if lt IE 8]> <script src ="http://ie7-js.googlecode.com/svn/version/2.1(beta2)/IE8.js"></script> <![endif]--> </head> <body> <ul id="nav"> <li><a href="#">Home</a></li> <li><a href="#">About</a> <ul> <li><a href="#">About Us</a></li> <li><a href="#">About Them</a></li> <li><a href="#">About You</a> <ul> <li><a href="#">More About Us</a></li> <li><a href="#">More About Them</a></li> <li><a href="#">More About You</a></li> </ul> </li> </ul> </li> <li><a href="#">Portfolio</a></li> <li><a href="#">Contact</a> <ul> <li><a href="#">International</a></li> <li><a href="#">Corporate</a> <ul> <li><a href="#">International</a></li> <li><a href="#">Corporate</a></li> <li><a href="#">American Offices</a></li> </ul> </li> <li><a href="#">American Offices</a></li> </ul> </li> <li><a href="#">Mission Statement</a></li> </ul> <p> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript" charset="utf-8"></script> <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.core.js" type="text/javascript"></script> </p> <p> <img src="file:///C|/Users/Miha/Documents/_Blinds_.jpg" width="256" height="256"> <script type="text/javascript" src="js/scripts.js"></script> </p> </body> </html> In order to install the "lightbox": You will need to include these three Javascript files in your header (in this order). <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> If I place these scripts in head - it wont work. If i delete the bottom three scripts which are used for nav bar then lightbox will work but then I shut off animation for nav bar? May-b someone had same problem and found solution where to put this three scripts from lightbox to work with nav bar ? (files for lightbox are in right position, styles are in right place, js is also located right - triple checked) Finished the whole d**n site and now the lighbox is eating my brains.. Tried searching for the answer on google and other forums and didnt find answer so any idea at all is very welcome. Hello, Don't know if this is in the right place. I've created a gallery using Jquery:http://www.perisandcorr.com/sue/painting.html. When you click on one of the images the gallery pops up fine but it is seeing too many images - 17 instead of 16??? Any ideas why this might be happening. I have a class one every thumbnail on the right hand side to make them sit in the right place. Could this be causing the problem. Thanks for any help. Dyfrig Can anybody point me in the right direction of finding a page that has some info on lightbox manipulation?? Or if by chance you know how to change the top margin value? As when the lightbox loads, it's way to far from the top of the page, like 200pixels as the default (as I haven't found how/where to change this). THANK YOU!! Hi, I am in the middle of building a html page and want to use the greybox lightbox code Ive found to load another webpage in the lightbox over my home page. Ive downloaded the greybox files and link to them (as instructed), Ive added the greybox script in my head tags (as instructed) and finally added the rel tag to my links... the pages open, but in a seperate browser window- they don't open in the greybox window. Ive played around with it for ages, trying to work it out- can anyone tell me what is wrong with this code?? <html> <head> <title>YOUTOPIA // personal fitness & wellbeing</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <style type="text/css"> <!-- body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #F8E0B2; } body { background-color: #000000; background-image: url(images/home-bg.jpg); background-repeat: repeat-x; } a:link { text-decoration: none; color: #F8E0B2; } a:visited { text-decoration: none; color: #F8E0B2; } a:hover { text-decoration: none; color: #FFFFFF; } a:active { text-decoration: none; color: #F8E0B2; } .style1 { font-size: 10px; font-style: italic; } #facebook { position:absolute; width:50; height:50; z-index:1; background-image: url(images/greenfblogo.png); left: 246px; top: 523px; visibility: visible; } .style2 {font-size: 12px} --> </style> <script type="text/javascript"> var GB_ROOT_DIR = "http://www.youtopiastudio.com.au/public/www/greybox/"; </script> <script type="text/javascript" src="http://www.youtopiastudio.com.au/public/www/greybox/AJS.js"></script> <script type="text/javascript" src="http://www.youtopiastudio.com.au/public/www/greybox/AJS_fx.js"></script> <script type="text/javascript" src="http://www.youtopiastudio.com.au/public/www/greybox/gb_scripts.js"></script> <link href="http://www.youtopiastudio.com.au/public/www/greybox/gb_styles.css" rel="stylesheet" type="text/css" /> </head> <body> <!-- ImageReady Slices (home-youtopia.psd) --> <script type="text/javascript"> var GB_ROOT_DIR = "http://www.youtopiastudio.com.au/public/www/greybox/"; </script> <script type="text/javascript" src="http://www.youtopiastudio.com.au/public/www/greybox/AJS.js"></script> <script type="text/javascript" src="http://www.youtopiastudio.com.au/public/www/greybox/AJS_fx.js"></script> <script type="text/javascript" src="http://www.youtopiastudio.com.au/public/www/greybox/gb_scripts.js"></script> <link href="http://www.youtopiastudio.com.au/public/www/greybox/gb_styles.css" rel="stylesheet" type="text/css" /> <a rel="gb_page_center[500, 500]" href="http://www.youtopiastudio.com.au/what.html" >link</a> <table width="900" height="600" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01"> <tr> <td colspan="14"> <img src="images/image-1.jpg" width="900" height="90" border="0" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="90" alt=""></td> </tr> <tr> <td rowspan="2"> <img src="images/home-youtopia_02.jpg" width="82" height="33" alt=""></td> <td colspan="4"> <img src="images/home-youtopia_03.jpg" width="203" height="18" alt=""></td> <td> <img src="images/home-youtopia_04.jpg" width="63" height="18" alt=""></td> <td colspan="8" rowspan="2"> <img src="images/home-youtopia_05.jpg" width="552" height="33" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="18" alt=""></td> </tr> <tr> <td colspan="4"> <img src="images/home-youtopia_06.jpg" width="203" height="15" alt=""></td> <td> <img src="images/home-youtopia_07.jpg" width="63" height="15" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="15" alt=""></td> </tr> <tr> <td colspan="14"> <img src="images/home-youtopia_08.jpg" width="900" height="28" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="28" alt=""></td> </tr> <tr> <td colspan="3"> <img src="images/home-youtopia_09.jpg" width="228" height="51" alt=""></td> <td colspan="6" rowspan="3"> <img src="images/home-youtopia_10.jpg" width="281" height="269" alt=""></td> <td colspan="4" rowspan="4" background="images/test-panel-main.jpg"> <div style="position:relative; width:300px;"> <div id="maintext" style="position:absolute; left:11px; top:-128px; z-index:10; width: 353px; height: 272px; visibility: visible;"> <div align="justify"> <p class="style2"><em>We are a private, personal training and wellness facility, with a focus on lifestyle, balance and wellbeing. Youtopia provides a calm, safe and friendly environment where you can go to simply get fit for living <strong>LIFE</strong>! There are no cues for equipment, no life-long contracts and no pricey membership fees. </em></p> <p class="style2"><em><br> Youtopia provides a challenging and functional workout rather than frustrating encounters. Youtopia is exclusive but not expensive & more importantly it’s all about <strong>YOU</strong>! There’s no non-sense, no attitude and no judgements.</em></p> <p class="style2"><em> <br> Many of us want to lead more active and healthy lifestyles and have regular exercise be a part of our lives. But we lack the motivation to reach our goals alone... <a href="http://www.youtopiastudio.com.au/what.html"title="What is Youtopia?" rel="gb_page_center[500, 500]" ><strong>read more</strong></a> </em></p> <p class="style1"> </p> </div> </div> </div> </td> <td rowspan="5"> <img src="images/home-youtopia_12.jpg" width="19" height="313" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="51" alt=""></td> </tr> <tr> <td colspan="3"> <img src="images/text--bar-left.jpg" width="228" height="22" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="22" alt=""></td> </tr> <tr> <td colspan="3"> <img src="images/text-panel-small.jpg" width="228" height="196" alt=""> </td> <td> <img src="images/spacer.gif" width="1" height="196" alt=""></td> </tr> <tr> <td colspan="9" rowspan="2"> <img src="images/home-youtopia_15.jpg" width="509" height="44" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="22" alt=""></td> </tr> <tr> <td colspan="4"> <img src="images/text-bar-right.jpg" width="372" height="22" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="22" alt=""></td> </tr> <tr> <td colspan="14"> <img src="images/home-youtopia_17.jpg" width="900" height="35" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="35" alt=""></td> </tr> <tr> <td colspan="14"> <img src="images/home-youtopia_18.jpg" width="900" height="16" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="16" alt=""></td> </tr> <tr> <td colspan="2" rowspan="2"> <a href="http://www.facebook.com" target="_blank"><img src="images/home-youtopia_19.jpg" alt="" width="95" height="60" border="0"></a></td> <td colspan="2"> <img src="images/button-why.jpg" alt="" width="155" height="30" border="0"></td> <td rowspan="2"> <img src="images/home-youtopia_21.jpg" width="35" height="60" alt=""></td> <td colspan="2"> <img src="images/button-philosophy.jpg" width="160" height="30" alt=""></td> <td rowspan="2"> <img src="images/home-youtopia_23.jpg" width="35" height="60" alt=""></td> <td colspan="2"> <img src="images/button-trainers.jpg" width="149" height="30" alt=""></td> <td rowspan="2"> <img src="images/home-youtopia_25.jpg" width="35" height="60" alt=""></td> <td> <a href="http://www.thehavocplan.com"rel="gb_page_center[500, 500]"><img src="images/button-gallery.jpg" alt="" width="181" height="30" border="0"></a></td> <td colspan="2" rowspan="2"> <img src="images/home-youtopia_27.jpg" width="55" height="60" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="30" alt=""></td> </tr> <tr> <td colspan="2"> <img src="images/button-eat.jpg" width="155" height="30" alt=""></td> <td colspan="2"> <img src="images/button-offers.jpg" width="160" height="30" alt=""></td> <td colspan="2"> <img src="images/button-press.jpg" width="149" height="30" alt=""></td> <td> <img src="images/button-details.jpg" width="181" height="30" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="30" alt=""></td> </tr> <tr> <td colspan="14"> <img src="images/home-youtopia_32.jpg" width="900" height="25" alt=""></td> <td> <img src="images/spacer.gif" width="1" height="25" alt=""></td> </tr> <tr> <td> <img src="images/spacer.gif" width="82" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="13" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="133" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="22" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="35" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="63" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="97" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="35" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="29" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="120" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="35" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="181" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="36" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="19" height="1" alt=""></td> <td></td> </tr> </table> <!-- End ImageReady Slices --> </body> </html> I'm about to try and code this page. Basically, it is a group of of linked images. I want to have the images open in lightbox 2.0 but I also want them to have a roll over element. I know both features require javascript, so can they both work together? (stupid question?) I know the scripts have to go in the head of the page. Lets say the images are as follows work1_off.jpg work1_on.jpg work2_off.jpg work2_on.jpg work3_off.jpg work3_on.jpg work4_off.jpg work4_on.jpg work5_off.jpg work5_on.jpg work6_off.jpg work6_on.jpg work7_off.jpg work7_on.jpg work8_off.jpg work8_on.jpg work9_off.jpg work9_on.jpg what might the tags look like? Hey, I need to create Lightbox with embeded Flickr albums with added facebook like buttons, any one know how to? ive set up lightbox. Any help would be greatly appreciated! Many Thanks, Bernie http://www.gouramidesign.com/portfolio.aspx#webdesign See that website, how it opens a lightbox type of thing, but wth the image on the left side and then a text on the right side ?What scripts does that website use? I currenty use prettybox, a jquery script, but I dont want to JUST display images, io want to have a website portfolio and thi sis EXACTLY what I've been looking for! I'm looking for a lightbox type script that can show an external .html (iframe) on my page. I saw it a while back while I searching for scripts but I can't find it anymore, and I wasn't if it was reliable or not. What I want it to do: Click on a picture or link Opens up a lightbox on top of the Website, but instead of an image it will be an iframe displaying a contact form. Thanks! |