Rolande
Posts: 4
Joined: Sat Jan 16, 2016 7:27 pm

different galleries / one page CSS pb

Hi, i'm sorry for my english but i'm french.
I make tests on this page :
http://www.commeuneonde.fr/HS/

I'd like to have diefferent dimming mask color for each gallery.

I saw css rule
.highslide-dimming {
background: #E55050;
}

but I can't find how to customize each one with a different color.
than'k for help
Last edited by Rolande on Sat May 28, 2016 4:10 pm, edited 2 times in total.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: different galleries / one page CSS pb

You can use http://highslide.com/ref/hs.wrapperClassName. For example:

Code: Select all

<a class="highslide" href="full1.jpg" onclick="return hs.expand(this, { wrapperClassName: 'red-dimming' })">
   <img src="thumb1.jpg" alt="">
</a>
<a class="highslide" href="full3.jpg" onclick="return hs.expand(this, { wrapperClassName: 'blue-dimming' })">
   <img src="thumb3.jpg" alt="">
</a>
The CSS:

Code: Select all

.red-dimming .highslide-dimming {
    background: #ff0000;
}
.blue-dimming .highslide-dimming {
    background: #0000ff;
}
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: different galleries / one page CSS pb

And to configure two separate galleries, you can use config objects. In the <head> section, or in highslide.config.js:

Code: Select all

<script>
var config1 = {
	slideshowGroup: 'group1',
	wrapperClassName: 'red-dimming'
};

var config2 = {
	slideshowGroup: 'group2',
	wrapperClassName: 'blue-dimming'
};
</script>
The HTML:

Code: Select all

<a class="highslide" href="full1.jpg" onclick="return hs.expand(this, config1)">
   <img src="thumb1.jpg" alt="">
</a>

(etc.)
Same CSS as above.
Rolande
Posts: 4
Joined: Sat Jan 16, 2016 7:27 pm

Re: different galleries / one page CSS pb

I understand the principle Thanks But I don't know wy it does'nt work !
I surely missed something ...
The link again : http://www.commeuneonde.fr/HS/

HTML
<div class="highslide-gallery">
<a id="thumb1" href="highslide/images/large/slideA_001.jpg" class="highslide"
title="" onclick="return hs.expand(this, config1)">
<img src="highslide/images/thumbs/slideA_001.jpg" alt=""/>
</a>

my CSS
.dimmin1 .highslide-dimming {
background: #ffff00;
}
.dimmin2 .highslide-dimming {
background: #E55050;
}
my JS (I already had 2 groups)
var config1 = {
slideshowGroup: 'group1',
wrapperClassName: 'dimmin1',
outlineType: 'rounded-white',
autoplay: true,
thumbnailId: 'thumb1',
transitions: ['expand', 'crossfade']
};
var config2 = {
slideshowGroup: 'group2',
wrapperClassName: 'dimmin2',
outlineType: 'rounded-white',
autoplay: true,
thumbnailId: 'thumb2',
transitions: ['expand', 'crossfade']
};
Last edited by Rolande on Sat May 28, 2016 4:10 pm, edited 2 times in total.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: different galleries / one page CSS pb

You haven't supplied the CSS for the dimmin1 and dimmin2 wrapperClasses. Par example:

Code: Select all

.dimmin1 .highslide-dimming {
    background: #ff0000;
}
.dimmin2 .highslide-dimming {
    background: #0000ff;
}
Edit: Oh, I see, you've put it into highslide.css. I'll need to study your page a bit more to figure out why it's not working.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: different galleries / one page CSS pb

Now I understand! The wrapperClassName applies only to highslide-wrapper. The dimming background isn't part of the wrapper, so my solution will not work. (You could use it for something like a different border on highslide-image, for example, since that is within the wrapper.)

I'll have to think about this a bit more....
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: different galleries / one page CSS pb

I can't find a way to target the highslide-dimming CSS for different galleries. The container div is being created "on the fly" by the script, and it's not part of anything else.

I don't think it's possible to do this. You may have to settle for "gray." ;)
Rolande
Posts: 4
Joined: Sat Jan 16, 2016 7:27 pm

Re: different galleries / one page CSS pb

Thank you very much for your help and patience.
I'll make all dimming masks blue ... It works very well. It will be less beautifull than a colour for each one but that's already very fun :lol:
see you ...
Rolande
Posts: 4
Joined: Sat Jan 16, 2016 7:27 pm

Re: different galleries / one page CSS pb

Hi,
I've fished all tests. My page is great.
I use photo galery (SCULPTURE / CERAMIQUE) and text ("A propos" and "Mentions légales" at the bottom) in the same page.

http://www.commeuneonde.fr/HS/

thanks again

Return to “Highslide JS Usage”