Irish SEO,  Marketing & Webmaster Discussion
 

 

Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 25-04-2008, 02:53 PM
Coder
 
Join Date: Apr 2008
Posts: 47
sticker will become famous soon enough
Default Lightbox2 CSS help!!

I'm tring to figure out Lightbox2 - I understand it's a commonly used bit of software and wondered if anyone here might be able to help me...

homepage Lightbox 2

I don't have a lot of CSS experience, is this the correct place for the script code?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
<a href="http://forums.techguy.org/images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
<p>TEST</p>
<p>&nbsp; </p>
</body>
</html>


I've downloaded the lightbox2 files - dumped the contents of the folders into the root directory of the site (css/images/js)

By the by the css file is appearing as a .txt file - ?!

Anyway I've also added the line of code for the image - see above "<a href="http://forums.techguy.org/images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>"

The preview in firefox simply shows a hotlink "image #1" which loads the larger image at the bottom of the page - not as it should...

Am I missing anything with the css files that come with the appliation? do I just dump them into the root directory?

Any ideas? - I'd love the get this figured!
Reply With Quote
  #2 (permalink)  
Old 25-04-2008, 03:21 PM
Developer
 
Join Date: Dec 2006
Location: Belfast
Posts: 172
MickyWall will become famous soon enough
Default

try this

Code:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
 <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>

</head>
 
<body>
<a href="http://forums.techguy.org/images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
<p>TEST</p>
<p>&nbsp; </p>
</body>
</html> 
Reply With Quote
  #3 (permalink)  
Old 25-04-2008, 03:30 PM
Coder
 
Join Date: Apr 2008
Posts: 47
sticker will become famous soon enough
Default

Quote:
Originally Posted by MickyWall View Post
try this

Code:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
 <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>

</head>
 
<body>
<a href="http://forums.techguy.org/images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
<p>TEST</p>
<p>&nbsp; </p>
</body>
</html> 
I changed it to my local file and it worked!! (kinda!)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<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>

</head>

<body>
<a href="image-1.jpg" rel="lightbox" title="my caption">image #1</a>
<p>TEST</p>
<p>&nbsp; </p>
</body>
</html>

The only problem is on the refreshed web page there still only exists a text link "image #1"

The thumnail for the image is called "thumb-1.jpg"

Do you know how I incorporate the thumbnail into the equation?!!

I'm using Dreamweaver...

Thanks for the prompt reply by the way!
Reply With Quote
  #4 (permalink)  
Old 25-04-2008, 04:09 PM
ButtermilkJack's Avatar
Wannabe Geek
 
Join Date: Feb 2006
Location: Dublin, Ireland
Posts: 259
ButtermilkJack will become famous soon enough
Default

As MickyWall showed, you didn't link to the css file in your code so this is why things didn't work initially. Make sure the path to the css file is correct.

Also, you've left out the code to insert the thumbnail. It should be like this...

<a href="image-1.jpg" rel="lightbox" title="my caption"><img src="thumb-1.jpg" alt="Thumbnail" /></a>
__________________
Print & Web Design

Last edited by ButtermilkJack; 25-04-2008 at 05:09 PM. Reason: Corrected ending tag for <img>
Reply With Quote
  #5 (permalink)  
Old 25-04-2008, 04:26 PM
Frodo's Avatar
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 335
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Default

Quote:
Originally Posted by sticker View Post
file:///W:/WEBSITES/Charlie Website/Active Site!!!!!!!!!!!!/image-1.jpg
You shouldn't have spaces or exclamation marks if your file path either not even on localhost really. It just encourages bad habits!
__________________

Reply With Quote
  #6 (permalink)  
Old 25-04-2008, 07:43 PM
Coder
 
Join Date: Apr 2008
Posts: 47
sticker will become famous soon enough
Default

Quote:
Originally Posted by ButtermilkJack View Post
As MickyWall showed, you didn't link to the css file in your code so this is why things didn't work initially. Make sure the path to the css file is correct.

Also, you've left out the code to insert the thumbnail. It should be like this...

<a href="image-1.jpg" rel="lightbox" title="my caption"><img src="thumb-1.jpg" alt="Thumbnail" /></a>
Thanks!
Reply With Quote
  #7 (permalink)  
Old 26-04-2008, 10:29 AM
Coder
 
Join Date: Apr 2008
Posts: 47
sticker will become famous soon enough
Default

IT WORKED!!!!

I didn't place the folders into the root as they are...

THANKS FOR EVERYTHING GUYS - appreciate the help!!!

Last edited by sticker; 26-04-2008 at 11:14 AM.
Reply With Quote
  #8 (permalink)  
Old 26-04-2008, 11:16 AM
ButtermilkJack's Avatar
Wannabe Geek
 
Join Date: Feb 2006
Location: Dublin, Ireland
Posts: 259
ButtermilkJack will become famous soon enough
Default

Yes, you've taken the files out of their folders and placed them in the root. So, now when the document loads and the <head> section looks for "js/lightbox.js" it's not going to find it because you've taken it out of the folder 'js'.

You need to make sure your paths are correct. Either recreate the 3 folders you removed (i.e. "css", "images" & "js") and place the respective files back in, or change the paths in the <head> section to point to where the files are now (i.e. the root).

Personally, I would recreate the folders as it's always better practice to have a clean directory structure, rather than hundreds of files in the root.

That should get you going.

EDIT: You edited your post at the same time as my reply so this may seem strange to anyone reading it later on. Just a quick tip... In future I wouldn't make wholesale changes to your posts as people will be reading these later on and will lose track of the thread halfway through.
__________________
Print & Web Design

Last edited by ButtermilkJack; 26-04-2008 at 11:20 AM. Reason: OP edited/deleted previous post
Reply With Quote
  #9 (permalink)  
Old 26-04-2008, 12:11 PM
Coder
 
Join Date: Apr 2008
Posts: 47
sticker will become famous soon enough
Default

Quote:
Originally Posted by ButtermilkJack View Post
Yes, you've taken the files out of their folders and placed them in the root. So, now when the document loads and the <head> section looks for "js/lightbox.js" it's not going to find it because you've taken it out of the folder 'js'.

You need to make sure your paths are correct. Either recreate the 3 folders you removed (i.e. "css", "images" & "js") and place the respective files back in, or change the paths in the <head> section to point to where the files are now (i.e. the root).

Personally, I would recreate the folders as it's always better practice to have a clean directory structure, rather than hundreds of files in the root.

That should get you going.

EDIT: You edited your post at the same time as my reply so this may seem strange to anyone reading it later on. Just a quick tip... In future I wouldn't make wholesale changes to your posts as people will be reading these later on and will lose track of the thread halfway through.
I understand - I figured the problem out as I was posting! - but you're quite right of course!

Thanks again! - a good first experience posting here!!

Last edited by sticker; 26-04-2008 at 12:15 PM.
Reply With Quote
  #10 (permalink)  
Old 26-04-2008, 12:32 PM
Coder
 
Join Date: Apr 2008
Posts: 47
sticker will become famous soon enough
Default

Just to close this issue once and for all!!

A final quick question... when I completed the gallery - the thumbnail images in IE & firefox are showing the dreaded blue sourround (hotlink)

Is there any way to remove the blue border?!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print view CSS Goodshape Coding Help 7 08-01-2008 05:22 PM
ie6 css :hover display:block; issue matt-dublin Coding Help 0 17-09-2007 09:05 PM
dynamic css 7aken Coding Help 6 10-10-2006 08:13 AM


All times are GMT +1. The time now is 07:05 PM.


Powered by: vBulletin Version 3.7.2, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.

Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56