Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] show/hide overlapping images with click event Reply To: show/hide overlapping images with click event

#156822
Alex
Participant

Your best bet would be to just use Javascript, but you could do something like this:

HTML:

    <div>
    <a class="a"href="#">Hey</a>
    <a class="b" href="#">Howdy</a>
    </div>

CSS:

div {position:relative;}
.a{position:absolute;}
.b{position:absolute; visibility:hidden;}
.a:active {visibility:hidden;}
.a:active + .b {visibility:visible;}

Although I’m not sure if that will produce the results you want, you’d have to hold the mouse button down.