# Cookies Button Alignment

**URL:** <https://community.hubspot.com/t/cookies-button-alignment/64514>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [September 6, 2022, 12:56pm UTC](https://community.hubspot.com/t/cookies-button-alignment/64514 "2022-09-06T12:56:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidJKenton](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DavidJKenton](https://community.hubspot.com/u/DavidJKenton)\
**Post date:** [September 6, 2022, 12:56pm UTC](https://community.hubspot.com/t/cookies-button-alignment/64514/1 "2022-09-06T12:56:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [September 6, 2022, 1:50pm UTC](https://community.hubspot.com/t/cookies-button-alignment/64514/2 "2022-09-06T13:50:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DavidJKenton](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DavidJKenton](https://community.hubspot.com/u/DavidJKenton)\
**Post date:** [September 6, 2022, 1:54pm UTC](https://community.hubspot.com/t/cookies-button-alignment/64514/3 "2022-09-06T13:54:26Z")

</div>

Cheers @LeeBartelme thats got it.
