Moving HTML container to middle (horizontally) of page

adamhartnell1
Tourist
8 0 2

I have created a text box using HTML code, but when i change the container size to 66% the container shrinks but then also sits on the left hand size of the page. Can someone help provide code that i can put into the HTML to move the container into the middle of the page?

Capture.JPG

 

 

0 Likes
haley0329
Shopify Expert
6 0 1

Apply this css to your container.

{

display: block;

margin-left: auto;

margin-right: auto;

}

0 Likes
adamhartnell1
Tourist
8 0 2

Hi, i tried to input it but no change. Where in the HTML do i enter it?:

 

<center>
<h3>Limited release craft beers. From their brewery to your door.</h3>
<p> Unfortunately, unexpected situations stop breweries from selling out of their beer. Managing stock is hard at the best of times, let alone when you're contending with event cancellations, customer closures, global pandemics...</p>
<p> Never fear. Top breweries anticipate this well in advance and sell their spare beer right here.</p>
<p>
Stop your favourite breweries losing money. Prevent waste. Save a few quid in the process. Make an impact, all from the swig of your glass.</p>
<br>
<a href="https://www.greenbottleshop.com/collections" class="btn hero__btn">Make an impact</a>
</center>

0 Likes