-1
I’m making a real estate website, and I need to leave a Whatsapp icon that redirects the user to the site owner’s Whatsapp. However I need her to be Sticky, stay in the bottom right corner and stay in mobile, he stay in "Absolute" (that goes over everything, but still stay Sticky in the bottom right corner
<!-- Whatsapp -->
<a href="http://api.whatsapp.com/send?1=pt_BR&phone=5511997812005" id="link" style="margin-left:94%;">
<img src="img/whatsapp-symbol-icon-logo-vector.png" id="whats-icon" >
</a>
css
#whats-icon{
position: sticky;
top:0;
float: right;
z-index: 10;
height: 60px;
width: 60px;
margin-right: 15px;
margin-top:15px;
margin-bottom: 0px;
}
#whats-icon:hover{
transition: 0.5;
border: 1px solid white;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
border-radius: 80px;
}
You want from a certain screen width the position to change from Sticky to Absolute?
– hugocsl
@hugocsl I want when you have it on desktop, it stays Sticky in the bottom right corner, but when you go mobile I want you to stay Absolute (staying on top of the posts) and also in the bottom right corner
– Stephanto
You know that when it looks like Absolute and you scroll on the page the button will accompany the scroll and will not be fixed in the right corner right?
– hugocsl
@hugocsl, then it has as I leave it Sticky on pc and when it is mobile, leave it fixed in the right corner of the screen, but accompanying the scroll of the page?
– Stephanto