hover box gallery

This is a discussion on "hover box gallery" within the Web Page Design section. This forum, and the thread "hover box gallery are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 13th, 2007, 10:32
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
hover box gallery

I am using a hover box gallery, but the images take a while to load up

www.lightex.co.uk/sarah/gallery.html

If I size the images to the largest preview size,300px x 250px then they are shown quater size in the thumbnail and the preview boxes, but normal size and they take ages to load. Not too sure if I am explaining it well but the customer is not happy and I'm fresh out of ideas
Reply With Quote

  #2 (permalink)  
Old Jul 13th, 2007, 10:59
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,431
Blog Entries: 13
Thanks: 1
Thanked 17 Times in 15 Posts
Re: hover box gallery

You could try to preload the images using css - probably best to preload them on the home page , so that the gallery can use them later when needed

Not tried it myself, but it may speed up the page slightly
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)

Last edited by welshstew; Jul 13th, 2007 at 11:05. Reason: brain to fast for my fingers to type
Reply With Quote
  #3 (permalink)  
Old Jul 13th, 2007, 11:59
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

You really need two sets of photos. You can put them all in the same folder just as long as they have different names.
One is small 150 x 150 (guessing) and then have the full sized. Change your code to show the smaller one on opening of page and then hover over uses the full size.

I used this feature well on this site. Look at my code if you want. Here is one list item
Code: Select all
<li><a href ="Fabric_Berries/45lg.jpg"><img src="Fabric_Berries/45.jpg" alt="Hot Pink Dot Minky"><img src="Fabric_Berries/45lg.jpg" alt="Hot Pink Dot Minky" class="preview" /></a><p>Hot Pink Dot</p></li>
Reply With Quote
  #4 (permalink)  
Old Jul 13th, 2007, 12:15
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Quote:
Originally Posted by Lchad View Post
You really need two sets of photos.
Yep ... totally agree with this. You need a thumbnail version of the photo and the original. In your case ... you should have 3 photos for each: the really small thumbnail you show on the page, the medium sized thumbnail for the hover and the original one.
Reply With Quote
  #5 (permalink)  
Old Jul 13th, 2007, 12:27
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Ah......... yes so right Karinne.. The big one is what they get when they click on the hover photo!

My client really loves this feature. I can see me using it often.
Reply With Quote
  #6 (permalink)  
Old Jul 13th, 2007, 13:41
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Ok have done a few things now, have done the preload

Code: Select all
<style type="text/css">
.hiddenPic {display:none;}
</style>

<img src="images/image2/Cssie 1.jpg" 
    height="300" width="250" class="hiddenPic">
and done the smaller image

Code: Select all
<a href="#"><img src="images/Gallery/100_0211.JPG" alt="description" width="300" height="250" /><img src="images/100_0211.JPG" alt="description" class="preview" /></a></li>
and the result is this:

http://www.lightex.co.uk/sarah/gallery.html
Reply With Quote
  #7 (permalink)  
Old Jul 13th, 2007, 13:52
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

That doesn't work ... how did you shrink the pic?! The picture itself is small the the entire image is still the same size as the original?!
Reply With Quote
  #8 (permalink)  
Old Jul 13th, 2007, 14:10
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Code: Select all
<a href="#"><img src="images/Gallery/100_0211.JPG" alt="description" width="300" height="250" /><img src="images/100_0211.JPG" alt="description" class="preview" /></a></li>
You can't leave the # in the first bit of your code. You need an image there.
Reply With Quote
  #9 (permalink)  
Old Jul 13th, 2007, 14:14
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,431
Blog Entries: 13
Thanks: 1
Thanked 17 Times in 15 Posts
Re: hover box gallery

Apologies, I don't think I made myself clear. By using the css preload you are downloading the pics to the visitors cache when they hit the home page (i.e. before they hit the gallery page). Then when they are called for a second time, on the gallery itself, it should be faster to load. You therefore need to move this part of the code to your clients homepage. And then get them to click on the gallery.

I agree about the images, I don't know how you have shrunk those pics, but it looked better before, it just took to long to load.
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #10 (permalink)  
Old Jul 13th, 2007, 14:17
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,431
Blog Entries: 13
Thanks: 1
Thanked 17 Times in 15 Posts
Re: hover box gallery

I hate to be a pain, but in IE7 the larger image pops underneath the thumbs.....
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #11 (permalink)  
Old Jul 13th, 2007, 16:47
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Shrunk images in fireworks to 300px x 250px
Reply With Quote
  #12 (permalink)  
Old Jul 13th, 2007, 16:50
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Quote:
welshstew. I hate to be a pain, but in IE7 the larger image pops underneath the thumbs......
Works in mine?
Reply With Quote
  #13 (permalink)  
Old Jul 13th, 2007, 19:19
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,431
Blog Entries: 13
Thanks: 1
Thanked 17 Times in 15 Posts
Re: hover box gallery

see the attached for what I get

Stew
Attached Images
File Type: jpg Untitled-4.jpg (13.2 KB, 28 views)
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #14 (permalink)  
Old Jul 13th, 2007, 22:02
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Ok I see it and am pondering, any suggestions?
Reply With Quote
  #15 (permalink)  
Old Jul 14th, 2007, 00:37
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Is your z-index set at 1?
Reply With Quote
  #16 (permalink)  
Old Jul 15th, 2007, 10:31
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Hi, acrikey. Had a look at your site and the download times are diabolical. You haven't shrunk some of the pictures filesize-wise i.e. some are straight off the camera at over 2mb EACH, and some reported corruption errors.

If you want a good hover graphics gallery, go here: http://sonspring.com/journal/hoverbox-image-gallery and look at the example, then download it.

In essence, say you want your main pic at 200 x 150: edit it to that size so that it's only a few kb in size. You are only going to use one image per frame. That one image is previewed at - say - half that size using CSS to scale. Simple.

Here's the meat of the CSS (you'll see the rest in the downloaded .zip):
Quote:
/* =Hoverbox Code
----------------------------------------------------------------------*/

.hoverbox
{
cursor: default;
list-style: none;
}

.hoverbox a
{
cursor: default;
}

.hoverbox a .preview
{
display: none; /* no preview until hover state - or it would be there all the time */
}

.hoverbox a:hover .preview
{
display: block;
position: absolute; /* this is therefore relative to the LI - not the page itself */
top: -33px; /* 0 lines the top of the preview image with the very top of the frame */
left: -45px; /* 0 lines the left edge of the preview to the extreme left of the frame */
z-index: 1; /* right or bottom could equally have been used */
}

.hoverbox img /* scaled version */
{
background: #fff;
border-color: #aaa #ccc #ddd #bbb; /* border around the 'thumbnail' */
border-style: solid;
border-width: 1px;
color: inherit;
padding: 2px; /* amount of background to reveal around the 'thumbnail' */
vertical-align: top;
width: 100px;
height: 75px;
}

.hoverbox li
{
background: #eee; /* main border effect caused by padding */
border-color: #ddd #bbb #aaa #ccc;/* the outside border of each frame */
border-style: solid;
border-width: 1px;
color: inherit;
display: inline;
float: left;
margin: 3px;/* the spacing between each frame */
padding: 5px; /* the thickness of each frame revealing the background */
position: relative;
}

.hoverbox .preview /* image at normal size when hovered */
{
border-color: #000; /* border around large image when hovered */
width: 200px;
height: 150px;
}
I'd thoroughly recommend it - it's amazing what can be achieved with CSS.

Hope that helps.

Oh, and some HTML:
Quote:
<ul class="hoverbox">
<li>
<a href="#"><img src="img/photo01.jpg" alt="description" /><img src="img/photo01.jpg" alt="description" class="preview" /></a>
</li>

Last edited by matelot; Jul 15th, 2007 at 10:37.
Reply With Quote
  #17 (permalink)  
Old Jul 19th, 2007, 12:28
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Ok, this is frustrating me, I have managed to get the hoverbox back on top in firefox but in IE still loosing.
Any help or advice would be very very very appreciated.

My CSS code is http://www.lightex.co.uk/sarah/CSS/hoverbox.css
if anyone needs to see it

HELP!
Reply With Quote
  #18 (permalink)  
Old Jul 19th, 2007, 13:23
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

Do you have a separate stylesheet for the IE.css?
Reply With Quote
  #19 (permalink)  
Old Jul 19th, 2007, 13:30
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

yes http://www.lightex.co.uk/sarah/CSS/ie_fixes.css
Reply With Quote
  #20 (permalink)  
Old Jul 19th, 2007, 15:17
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hover box gallery

the ie.css is right.
On the hoverbox.css I usually delete the entire portion of NON-essential code. It usually messes up my css that I've already put in.

I need to see a link to see what it's doing..
Reply With Quote
Reply

Tags
box, gallery, hover

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS li hover. PicoDeath Web Page Design 9 Dec 19th, 2007 14:26
Created Flash Photo Gallery in PhotoShop. How can I put this Gallery INSIDE a page?? BlackReef Flash & Multimedia Forum 3 Dec 13th, 2007 18:30
css hover alexgeek Web Page Design 9 Aug 2nd, 2007 18:18
hii Help with hover hawashp Starting Out 1 May 13th, 2007 16:35


All times are GMT. The time now is 13:29.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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