Add padding to section and center text

Add padding to section and center text

nxjus
Excursionist
29 0 9

Hi, i use a custom element of a delivery app in the product pagebut the text is not good positioned. I want the height of the text to be in the middle and 15px padding on the left.

Screenshot 2024-10-05 at 12.07.51.png

Thank You!

 

site: cultureposter.com (password: poster)

Replies 3 (3)

Tech_Coding
Shopify Partner
386 106 90

Hello @nxjus 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
   .delivery-widget__container > .msg__container {
          height: 68px !important;
    }
    .msg__container {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
   }
</style>

Tech_Coding_0-1728121403231.png

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.
nxjus
Excursionist
29 0 9

Hi, sorry but i want the text still to be left and now the box is too height. I just want the text to be in the middle of the height and 15px space left. Thank You!

Tech_Coding
Shopify Partner
386 106 90

@nxjus  please Replace above code with this

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
  .delivery-widget__container > .msg__container {
       height: unset !important;
  }
  .msg__container {
      padding: 10px 10px 10px 15px !important;
  }
</style>

Here is the result:

Tech_Coding_0-1728122161895.png

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.