Here is an example of my HTML code:
<html>
<head>
<style>
img.settings {
hight: 100px;
width: 20px;
}
div.settings {
position: fixed;
left: 0px;
top: 0px;
right: 100%;
bottom: 0px;
background-color: #000000;
}
</style>
</head>
<body>
<div class="head">
<img class="settings" src="settings.png" />
</div>
<div class="settings"></div>
</body>
</html>
I am looking to modify the div#setting
property from right: 100%;
to right: 50%;
when the image is clicked. Essentially, I want the <div>
to be displayed or hidden by clicking the image. Is it possible to achieve this using only CSS?