Member
Member
PierreSnugg   2008-04-30, 12:31
#1
I´m trying to get an active status of my thumbnails done, but i´m stuck right now.
Here is my css code from the thumbs:

`

.imagethumb a {

float:left;

display: block;

}

.imagethumb a:hover {

filter:alpha(opacity=50);

opacity:0.5;

-moz-opacity:0.3;

}

.imagethumb a:active {

filter:alpha(opacity=50);

opacity:0.5;

-moz-opacity:0.3;

}

`

Is there a way to get this done? So that the selected or active thumb gets a 50% alpha?
Member
Member
PierreSnugg   2008-05-05, 06:23
#2
Can somebody please help?
Administrator
Administrator
acrylian   2008-05-05, 08:56
#3
Try `.imagethumb a:active img {`additionally to adress the actual image.
Member
Member
PierreSnugg   2008-05-05, 08:57
#4
Nope, doesn´t work...
Member
Member
PierreSnugg   2008-05-05, 09:01
#5
I´m nearly at the end of my project and this function is the only thing that´s missing,
would bee cool if this will work somehow...
Member
Member
PierreSnugg   2008-05-05, 09:04
#6
My thumbnails are in image.php at the bottom of the big image. The code for
the thumbs in image.php is:

`



`
<?php $_current_image = $_zp_current_image; ?>
<?php while (next_album()): next_image(); ?>
"title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?>
<a>" title="View album: <?php echo getAlbumTitle();?>">
<?php printAlbumThumbImage(getAlbumTitle()); ?></a>
<?php endwhile; ?>
<?php while (next_image(false, $firstPageImages)): ?>
<div class="imagethumb">
<a>" title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?></a>
</div>
<?php endwhile; ?>
<?php $_zp_current_image = $_current_image; ?>
`



`
Administrator
Administrator
acrylian   2008-05-05, 09:35
#7
Well, I doubt that this will work with CSS alone. I would do that like this:
`<?php $currentimagetitle = getImageTitle(); while (next_image(false, $firstPageImages)):

if($currentimagetitle === getImageTitle()) { ?>

<div class="imagethumb-active">(...)

<?php } else { ?>

<div class="imagethumb">(...)

<?php } ?>

<?php endwhile; ?>`
Member
Member
PierreSnugg   2008-05-05, 09:46
#8
Now, i get a highlighted thumb (that´s great!) but all thumbs in the same row are somehow not clickable anymore. thumbs below are!

And also the thumbnails are dynamicly swaping their position. Maybe it´s a problem with the previous code. Here is my actualized code:

`



<?php $_current_image = $_zp_current_image; ?>

<?php while (next_album()): next_image(); ?>

"title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?>

">

<?php printAlbumThumbImage(getAlbumTitle()); ?>

<?php endwhile; ?>

<?php $currentimagetitle = getImageTitle(); while (next_image(false, $firstPageImages)):

if($currentimagetitle === getImageTitle()) { ?>

<div class="imagethumb_active">

"><?php printImageThumb(getImageTitle()); ?>



<?php } else { ?>



"><?php printImageThumb(getImageTitle()); ?>



<?php } ?>

<?php endwhile; ?>

<?php $_zp_current_image = $_current_image; ?>

`
</div>
Member
Member
PierreSnugg   2008-05-05, 10:50
#9
Ok, it´s working!

`



<?php $_current_image = $_zp_current_image; ?>

<?php while (next_album()): next_image(); ?>

"title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?>

">

<?php printAlbumThumbImage(getAlbumTitle()); ?>

<?php endwhile; ?>

<?php $currentimagetitle = getImageTitle(); while (next_image(false, $firstPageImages)):

if($currentimagetitle === getImageTitle()) { ?>

<div class="imagethumb_active">

<?php getImageTitle();?><?php printImageThumb(getImageTitle()); ?>



<?php } else { ?>



"><?php printImageThumb(getImageTitle()); ?>



<?php } ?>

<?php endwhile; ?>

<?php $_zp_current_image = $_current_image; ?>

</div>

`
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.