Struggling to apply a specific style to a div? Let me provide some context: I have 2 divs in a webapp - one serves as a popup notification resembling the IOS style, while the other is an image displaying product updates. Whenever a product is updated, a popup notification appears near the corner of the image.
The issue arises with aligning the popup div #popupContact and the image div .imatges3 using padding-top: -28px to match the alignment with other images. Upon clicking either the popup or the image, the popup disappears causing the image div to shift upwards due to the applied padding-top.
Is there a way to dynamically assign a different CSS value to a div based on whether another div is hidden or not?
Thank you.
Example:
<div class="imatges3" id="pop"><div id="popupContact"><span class="boton">3</span></div>
<a href="actualizacion.html">
<img src="actprod.png" alt="Product Updates" border="0">
</a>
</div>
and css
.imatges3 {
float: left;
width: 100px;
margin-left: 4px;
margin-right: 2px;
margin-top: -28px;
}
#popupContact{
display:none;
height:20px;
width:20px;
z-index:200;
font-size:13px;
font-family: Arial, Helvetica, sans-serif;
font-size: 8px;
color: #ffffff;
padding: 0px 0px;
position: relative;
top:30px;
left:75px;
}