Jump to content


** SOLVED **lightbox problem


2 replies to this topic

#1 zoom4267

    Young Padawan

  • Members
  • Pip
  • 191 posts
  • Gender:Female
  • Location:USA

Posted 16 October 2009 - 11:48 AM

click on an image.

when the large image comes up, you will see a scroll bar at the bottom. i cant figure out why its there and where it comes from, i dont want it there.

http://www.skytopdes...ca/designs.html

this is the lightbox i am using

http://www.huddletog...ects/lightbox2/

thanks

Edited by zoom4267, 19 October 2009 - 07:57 AM.


#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 17 October 2009 - 09:20 PM

Try to install Firebug for Firefox to manipulate the page and find out what is going on. Using this, I've found your problem quite easily.

The problem is that all images on your page are styled to have a padding of 8px (style.css line 65). Using Firebug I disabled the rule and immediately the problem scroolbar went away. I'm guessing it is because Lightbox makes a div element with a width of the image, and when you add a padding that it wasn't expecting, it overflows the frame.

Three solutions I came up with:
1. Kill the padding all together for all images
2. Make an exception rule to kill padding on images within that #lightbox div
3. Add a style for overflow:hidden on #imageDataContainer

I would recommend the second one. Add this code to either your own style, or to lightbox.css.

#lightbox img {
padding:0 !important;
}

That solves the scroll problem, but there is an inconsistency of color between the Close button and the space where the caption text would go below the image. I'll let you use Firebug to find out how to solve that on your own. :)

If you've never heard of Firebug, I highly recommend you try it out. Imagine being able to crawl every detail of a live webpage, be it manipulated with JavaScript or not, manipulate HTML, CSS, JavaScript, anything. Also imagine a command prompt-style way of executing your own debugging stuff... truly the best web development tool ever created, as it has lots more goodies included. :)

#3 zoom4267

    Young Padawan

  • Members
  • Pip
  • 191 posts
  • Gender:Female
  • Location:USA

Posted 18 October 2009 - 06:18 AM

thanks and i will try your suggestions

i do have firebug but i am not a great coder so i would easily miss some of the fixes, i did find some solutions playing with the .js file but i am really bad at that so i wont touch it much,

thanks alot





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users