+ 1
How to hover a class and effect an other class ?
I want to effect a class by hovering an othe class How to do it ? Plz
4 Answers
0
Somewhat like this?
<style>
.hovering{
height:100px;
width:100px;
background-color:blue;
position:absolute;
}
.effected{
height:100px;
width:100px;
background-color:red;
position:absolute;
top:100px;
left:20px;
}
.hovering:hover .effected{
left:120px;
}
</style>
</head>
<body>
<div class="hovering">
<div class="effected"></div>
</div>
+ 1
Ah thank you so much đđđ
+ 1
yup I was having that div outside as well until I realised that I had to put it inside ,
0
Thats why it didn't work because I didnt put the effected div inside the hovering