Trying to change the content of an image by clicking another image (image gallery viewer), using pure HTML/CSS.
I am using the gumby.css
framework and currently have the following HTML:
<section id="sect">
<div class="three columns">
<img src"/images/help.png">
</div>
<div class="one column">
<img src"/images/help.png">
</div>
</section>
And the following css:
#sect .three.columns img:hover {
content:url("/images/about.png");
border: 5px solid red;
}
#sect .one.column img:active ~ #sect .three.columns img {
content:url("/images/about.png");
border: 5px solid red;
}
The first css rule for #sect .three.columns img:hover
works perfectly, indicating I have selected the right element. But the second one #sect .one.column img:active ~ #sect .three.columns img
does nothing upon active.
Refer to here for the meaning of ~
.
Anyone have any ideas?
Thanks.