skip to Main Content

helo guys I got some code from my friend, this code is floating button for website, the button is floating on the left bottom corner on the web, but can someone help me to make this button float for example 50px from bottom?

and can we make it without using CSS ??

<script type="text/javascript">
    (function () {
        var options = {
            whatsapp: "+66xx", // WhatsApp number
            telegram: "@somethingxxx", // Telegram bot username
            call_to_action: "My Whatsapp and Tele", // Call to action
            button_color: "#932C8B", // Color of button
            position: "left", // Position may be 'right' or 'left'
            order: "whatsapp,telegram", // Order of buttons
        };
        var proto = document.location.protocol, host = "getbutton.io", url = proto + "//static." + host;
        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url + '/widget-send-button/js/init.js';
        s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
        var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
    })();
</script>

2

Answers


  1. first you need select your button

    then apply the css

    CSS:

    .button {
        position: fixed;
        bottom: 50px;
        left: 50px;   
    }
    
    
    Login or Signup to reply.
  2. Just add this CSS to override default position.

    div#wh-widget-send-button {
    bottom: 50px !important;
    }

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search