Cookies Button Alignment

Hi Guys,

I want to align the cookies button to the right of the page, it automatically goes to the left, I have tried amending the code with no luck.

This is the code HubSpot generates.

<!-- Start of HubSpot code snippet -->

<button type=“button” id=“hs_show_banner_button”

style="background-color: #425b76; border: 1px solid #425b76;

border-radius: 3px; padding: 10px 16px; text-decoration: none; color: #fff;

font-family: inherit; font-size: inherit; font-weight: normal; line-height: inherit;

text-align: left; text-shadow: none;"

onClick="(function(){

var _hsp = window._hsp = window._hsp || [];

_hsp.push([‘showBanner’]);

})()"

>

Cookie Settings

</button>

<!-- End of HubSpot code snippet -->

Can someone tell me how I align the code to the right, please?

Thank you,

David

That injects a button on the page and the button is set as an inline-block level element. So you should be able to move it however you might position any other inline-block level element.

In a simple manner you could use float: right to the CSS included. Floating elements come with its own considerations though.

style="background-color: #425b76; border: 1px solid #425b76; border-radius: 3px; padding: 10px 16px; text-decoration: none; color: #fff; font-family: inherit; font-size: inherit; font-weight: normal; line-height: inherit; text-align: left; text-shadow: none; float: right;"

Or you might wrap the button in other element to position it using the parent element and have more flexibity in interacting with other elements.

Cheers @LeeBartelme thats got it.