Results 1 to 6 of 6

Thread: Image Thumbnail Viewer - Image not centered

  1. #1
    Join Date
    Mar 2012
    Location
    Romania
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer - Image not centered

    1) Script Title: Image Thumbnail Viewer

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

    3) Describe problem: Image is not centered

    Hello there!

    I have recently decided to use your very nice Thumbnail Viewer, but I really don't understand what may be the problem with it or why it is not centering the images.

    On my 19 inch monitor the large image that pops out has a significant offset and because of that a horizontal scroll appears.

    I have built a short example to illustrate the issue, nothing more than a few nested divs with relative positioning.
    I also tried position: fixed; for the #thumbBox and this centered the image but since I have very tall images, only half of them would have been visible.

    http://peisaje-montane.ro/tv/thumbna...-centered.html

    I would really appreciate if you'd explain to me why does this happen or what should I improve to make it work.



    Thank you in advance and best regards from Romania

    Gabriel F.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,791
    Thanks
    2
    Thanked 418 Times in 412 Posts

    Default

    problem with your css, remove the red

    Code:
    body	{
    			position: relative;
    			min-height: 100%;
    			margin: 0 auto;
    			width: 950px;
    			font-family: Georgia, "Times New Roman", Times, serif;
    			font-size: 16px;
    			color: #000000;
    			text-align: left;
    			border: solid 5px #0099CC;
    		}
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    waz_up (03-27-2012)

  4. #3
    Join Date
    Mar 2012
    Location
    Romania
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Yes, works great now
    I've simply shifted margin: 0 auto; to the wrapper. Many thanks and keep up the good job!

  5. #4
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm having a similar problem. The first time I click on the picture, the large picture is centered as it should be, each subsequent time you click the thumbnail, it's offset. I've used this script on a few sites and never noticed it before now. An example is here:

    designtoinstallation.com/portfolio.html

    I've tested on Chrome & IE, and the bug only seems to be with Chrome.

    Thoughts?

  6. #5
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Update: http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm has the same bug for Chrome, so perhaps it isn't just me.

  7. #6
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    My other post didn't show up (or had to be approved) - but my update did - so this is out of order I guess! Sorry...

    In Chrome when you click on the thumbnail it opens the large image as it should be (centered) - but if you close the enlarged image and re-click on the thumbnail, the image is off-set. Thoughts?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •