In the HTML page, I have two buttons implemented with the following code:
<!-- Button for WIFI projects: -->
<a title="WIFI" href="javascript: void(0)" id="showWifi_${item.index}" class="showWifi">
<div class="news_box news_box_01 hvr-underline-from-center " style="margin-right: 50px;"></div>
</a>
<!-- Button for PNSD projects: -->
<a title="PNSDe" href="javascript: void(0)" id="showPnsd_${item.index}" class="showPnsd">
<div class="news_box news_box_02 hvr-underline-from-center "></div>
</a>
Below is the CSS that adds a background image to the div implementing the button:
.news_box_01 {
background: rgba(0, 0, 0, 0) url("../../img/icons/projects/wifi_big_transparent_2.png") repeat scroll 0 0;
}
.news_box_02 {
background: rgba(0, 0, 0, 0) url("../../img/icons/projects/PNSD.png") repeat scroll 0 0;
}
My current issue is how to highlight the selected button when it's clicked by the user.
I am aware of using the :active selector to target a clicked link. However, I'm unsure of how to apply CSS effects like highlighting on the background image when the link is clicked.
Any ideas or suggestions would be greatly appreciated!