Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Changing a Css Hover to a click
Old 01-30-2008, 02:18 PM Changing a Css Hover to a click
Experienced Talker

Posts: 30
Trades: 0
I have a Gallery on my site now, When you hover over the image, It displays the images larger,

Is there any way to make it display the image the same way, but the users have to click rather as hover over?

This is the CSS and the webpage is here.

http://www.digicars.co.uk/web/new/photography.php

Quote:

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

.hoverbox a
{
cursor: default;
}

.hoverbox a .preview
{
display: none;
}

.hoverbox a:hover .preview
{
display:block;
position: absolute;
top: -33px;
left: -45px;
z-index: 1;
}

.hoverbox img
{
background: #fff;
border-color: #aaa #ccc #ddd #bbb;
border-style: solid;
border-width: 1px;
color: inherit;
padding: 2px;
vertical-align: top;
width: 100px;
height: 75px;
}

.hoverbox li
{
background: #eee;
border-color: #ddd #bbb #aaa #ccc;
border-style: solid;
border-width: 1px;
color: inherit;
display: inline;
float: left;
margin: 3px;
padding: 5px;
position: relative;
}

.hoverbox .preview
{
border-color: #000;
width: 600px;
height: 480px;

}
scoobs001 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-30-2008, 02:31 PM Re: Changing a Css Hover to a click
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Is there any way to make it display the image the same way, but the users have to click rather as hover over?
Yes, but you have to do it with scripting using the onClick event
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-30-2008, 02:37 PM Re: Changing a Css Hover to a click
Experienced Talker

Posts: 30
Trades: 0
Cheers
for that, just so i know that script wont work for my needs, I'll hunt for
another
one
scoobs001 is offline
Reply With Quote
View Public Profile
 
Old 01-30-2008, 02:39 PM Re: Changing a Css Hover to a click
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
It's a fairly simple thing to do, you just can't do it with CSS alone. Lots of scripts around.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-30-2008, 03:10 PM Re: Changing a Css Hover to a click
Super Moderator

Posts: 1,584
Location: Kokkola, Finland
Trades: 1
you might consider this http://www.huddletogether.com/projects/lightbox2/
davemies is offline
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 01-30-2008, 03:58 PM Re: Changing a Css Hover to a click
Experienced Talker

Posts: 30
Trades: 0
Quote:
Originally Posted by davemies View Post
That looks like the one, I'll bookmark it and try it out tomorow when i have time, cheers Dave,
scoobs001 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Changing a Css Hover to a click
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27265 seconds with 12 queries