Jump to content

Split screens on mobile - background image and text separated, not text on top of background image

Recommended Posts

Site URL: https://www.aliciasloandesign.com

Hi folks,

On my website, in the About Me & Skills section, the text overlaps the background images on mobile. I'd like to have the text separate on mobile (order isn't a concern, first text then image, or image and then text). Is this possible? Here is what I am doing:

https://www.aliciasloandesign.com

<style>@media only screen and (min-width: 768px){ .page-section:nth-child(2) .section-background {width:50%!important; margin-left:50%!important}}
@media only screen and (min-width: 768px){ .page-section:nth-child(3) .section-background {width:50%!important; margin-right:50%!important}}
}</style>

If you see the attachment, I'd like the text to stay on a white background.

css.PNG

Link to comment
On 4/1/2021 at 11:27 PM, AliSloan said:

Site URL: https://www.aliciasloandesign.com

Hi folks,

On my website, in the About Me & Skills section, the text overlaps the background images on mobile. I'd like to have the text separate on mobile (order isn't a concern, first text then image, or image and then text). Is this possible? Here is what I am doing:

https://www.aliciasloandesign.com

<style>@media only screen and (min-width: 768px){ .page-section:nth-child(2) .section-background {width:50%!important; margin-left:50%!important}}
@media only screen and (min-width: 768px){ .page-section:nth-child(3) .section-background {width:50%!important; margin-right:50%!important}}
}</style>

If you see the attachment, I'd like the text to stay on a white background.

css.PNG

try this, it will work best if you keep the structure of the sections like current way

section[data-section-id="606601680b52ab02c0e7c111"] .sqs-row {
  position: relative;
}
section[data-section-id="606601680b52ab02c0e7c111"] .sqs-row .sqs-col-6:first-child {
    position: absolute;
    width: 100% !important;
    opacity: 0.5;
    top: 0;
}
section[data-section-id="606601680b52ab02c0e7c111"] .sqs-row .sqs-col-6:first-child .image-block {
    padding: 0;
}
section[data-section-id="6066031d002e4c178f6093d0"] .sqs-row {
  position: relative;
}
section[data-section-id="6066031d002e4c178f6093d0"] .sqs-row .sqs-col-6:nth-child(1) {
  z-index: 999;
    position: relative;
}
section[data-section-id="6066031d002e4c178f6093d0"] .sqs-row .sqs-col-6:last-child {
    position: absolute;
    width: 100% !important;
    opacity: 0.5;
    top: 0;
}
section[data-section-id="6066031d002e4c178f6093d0"] .sqs-row .sqs-col-6:first-child .image-block {
    padding: 0;
}

image.thumb.png.9b8b47cc20f13706f87c28d62324374f.png

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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.