Reputation: 67
Hi I am trying to make a floating widget like facebook messenger in google site but the problem is that it only stays at the very bottom on its section
here's my code
<html>
<style>
.UtePc #pingpilot{
display: none;
position: absolute;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: #660000;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 4px;
}
</style>
<body>
<script id="pingpilot" type="text/javascript" src="https://widget.pingpilot.com/widget-button.js" data-signal="483c60" async></script>
</body>
<html>
When I scroll down to the very bottom it only stays there. What I want is that even if I scroll up it should still float where ever I scroll.
Upvotes: 0
Views: 1091
Reputation: 19251
what you want is position: fixed
, which places relative to the viewport.
Upvotes: 1