Jump to content

Shifting text block to see shape outline in mobile view?

Go to solution Solved by tuanphan,

Recommended Posts

Hello! I'm trying to create text with a margin (created using a text block background) over a white background (rectangle shape) that has a border. This works just fine on desktop, but on mobile the text block background overlays the shape border on the left side and covers up the border. I've attached images below showing what is happening. I would just make the text block itself have a border but the problem is that I have multiple text blocks within each section and want to have just one larger border for all of them. I'm thinking that if there is a way to use code to shift the text blocks to the right ever so slightly (just on mobile) that might be the way to uncover the border? Any other ideas welcome too!  : )  Thanks in advance!

website: andreakloehn.com     password: flute43

code used to create border on white rectangle background: 

#block-whichever block I'm using {
    border: 2px solid #000369;
}

image.png

Screenshot 2023-12-01 at 10.11.40 PM.png

Screenshot 2023-12-01 at 10.11.47 PM.png

Link to comment
  • Replies 4
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

You can add this to Website Tools (under Not Linked) > Custom CSS

/* Music Page - Fix border disappear */
@media screen and (max-width:767px) {
#block-86b3b8fcd2523a5231b8 {
    width: calc(~"100% - 10px") !important;
    margin: 0 auto !important;
}
}

image.png.8db9f8bf5ddbf4147bbca23f3eadb329.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (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.