SeanCrafted Posted March 8, 2022 Share Posted March 8, 2022 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/ Please can someone advise how I fix this - looks ok on mobile but not on desktop/laptop. Cheers Link to comment
Beyondspace Posted March 8, 2022 Share Posted March 8, 2022 1 hour 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/ Please can someone advise how I fix this - looks ok on mobile but not on desktop/laptop. Cheers Do you mean thing box? It seems Ok. Have you figured out? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 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
SeanCrafted Posted March 8, 2022 Author Share Posted March 8, 2022 Hello, No the text box in the 3 images above that? I can't get them centred no matter how hard I try. Link to comment
SeanCrafted Posted March 9, 2022 Author Share Posted March 9, 2022 22 hours ago, bangank36 said: Do you mean thing box? It seems Ok. Have you figured out? Link to comment
tuanphan Posted March 13, 2022 Share Posted March 13, 2022 On 3/9/2022 at 8:24 PM, SeanCrafted said: You mean this text? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
SeanCrafted Posted March 13, 2022 Author Share Posted March 13, 2022 5 hours ago, tuanphan said: You mean this text? Yes that's correct Link to comment
tuanphan Posted March 14, 2022 Share Posted March 14, 2022 10 hours ago, SeanCrafted said: Yes that's correct Add to Design > Custom CSS /* Mobile-Homepage-Center text */ @media screen and (max-width:767px) { body.homepage article section:nth-child(n+2) .html-block * { text-align: center; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
SeanCrafted Posted March 15, 2022 Author Share Posted March 15, 2022 On 3/14/2022 at 2:21 AM, tuanphan said: Add to Design > Custom CSS /* Mobile-Homepage-Center text */ @media screen and (max-width:767px) { body.homepage article section:nth-child(n+2) .html-block * { text-align: center; } } Thing is I currently have this html in already, do I replace it? /*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
tuanphan Posted March 16, 2022 Share Posted March 16, 2022 12 hours ago, SeanCrafted said: Thing is I currently have this html in already, do I replace it? /*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; } Don't remove any code in your current code. Add my code under Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
SeanCrafted Posted March 16, 2022 Author Share Posted March 16, 2022 7 hours ago, tuanphan said: Don't remove any code in your current code. Add my code under Hi There, I am still having issues with the centering on desktop? The Restaurant needs to centred in the middle of image/page. Link to comment
tuanphan Posted March 18, 2022 Share Posted March 18, 2022 On 3/16/2022 at 4:57 PM, SeanCrafted said: Hi There, I am still having issues with the centering on desktop? The Restaurant needs to centred in the middle of image/page. Above code runs on mobile only. With desktop + Mobile, use this new code body.homepage article section:nth-child(n+2) .html-block * { text-align: center; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment