Jump to content

Centering of text

Recommended Posts

  • Replies 5
  • Views 264
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

5 hours ago, SeanCrafted said:

Site URL: https://www.ptmy-morpeth.co.uk/

Hi there, 

I am struggling to centre the text boxes on my homepage - https://www.ptmy-morpeth.co.uk/

There are 3 images but the text in each of them is off centre and I have tried to fix it but can't.

Please can someone advise how I fix this - looks ok on mobile but not on desktop/laptop.


Cheers

Try adding to Home > Design > Custom Css

#collection-61dd91b710682f3ded1d7b5d h3 {
  margin-left: 0 !important;
  display: flex;
  justify-content: center;
}

.content-wrapper {
  box-sizing: border-box !important;
}

Let me know how it works on your site

Support me by pressing 👍 if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.a999776627a2da4c19745e3349e878c0.png

I also add the code to fix the overflow in horizon direction

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 3/10/2022 at 3:22 PM, bangank36 said:

My testing

image.thumb.png.a999776627a2da4c19745e3349e878c0.png

I also add the code to fix the overflow in horizon direction

Hi There,

I already have this custom code.

How do I add the rest you put for the centring?

/*1st section*/
section[data-section-id="61dda8e9afd08334af9f9a94"] {
    a {
        &:after {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
        }
    }
    .content-wrapper {
        * {
            position: static;
        }
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: absolute !important;
        align-items: center;
    }
}

/*2nd section*/
section[data-section-id="61dda8876d090a490c87f020"] {
    a {
        &:after {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
        }
    }
    .content-wrapper {
        * {
            position: static;
        }
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: absolute !important;
        align-items: center;
    }
}

/*3rd section*/
section[data-section-id="61dda984e4dcf868ea78e99b"] {
    a {
        &:after {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
        }
    }
    .content-wrapper {
        * {
            position: static;
        }
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: absolute !important;
        align-items: center;
    }
}

/* Footer image */
div#block-yui_3_17_2_1_1643899665179_6702 {
    width: 50%;
    margin: 0 auto;
}

Link to comment
21 hours ago, SeanCrafted said:

Hi There,

I already have this custom code.

How do I add the rest you put for the centring?

/*1st section*/
section[data-section-id="61dda8e9afd08334af9f9a94"] {
    a {
        &:after {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
        }
    }
    .content-wrapper {
        * {
            position: static;
        }
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: absolute !important;
        align-items: center;
    }
}

/*2nd section*/
section[data-section-id="61dda8876d090a490c87f020"] {
    a {
        &:after {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
        }
    }
    .content-wrapper {
        * {
            position: static;
        }
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: absolute !important;
        align-items: center;
    }
}

/*3rd section*/
section[data-section-id="61dda984e4dcf868ea78e99b"] {
    a {
        &:after {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: transparent;
            position: absolute;
            top: 0;
            left: 0;
        }
    }
    .content-wrapper {
        * {
            position: static;
        }
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: absolute !important;
        align-items: center;
    }
}

/* Footer image */
div#block-yui_3_17_2_1_1643899665179_6702 {
    width: 50%;
    margin: 0 auto;
}

I check that the DOM element has changed. Have you change the content in this page?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
7 hours ago, bangank36 said:

I check that the DOM element has changed. Have you change the content in this page?

Yes, I removed the image that was at the bottom and replaced it with something else. (food rating image)

So if you can do the code for it all that would be such a big help.

Thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.