Text forced onto single line - Website and mobile

Hi i have two things i’m unable to resolve and need help;

On my mobile layout i am getting the text box floating above my image - it looks great in desktop view as the text sits over image but for mobile it only above it.

My second is the text box container forces the text over two line - can i inject code to force it to stay on one single line? - www.wearenarc.com (home page)

2 Likes

@Hund1256

Please add the following CSS code to your assets/theme.css bottom of the file.

.content-over-media>:not(img,video,iframe,svg,video-media) {
    max-width: max-content !important;
}

Thanks!

1 Like

Thank you so much, it worked perfectly for the website. Is there anyway we can get the image to be in the background for the mobile site, as now it is just white?

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > theme.css and paste this at the bottom of the file:
.content-over-media.full-bleed.text-custom .place-self-start-center {
    max-width: 100%;
}
@media (max-width:767px){
.section-stack {
    position: relative;
}
.section-header.md\:hidden {
    position: absolute;
    top: 2%;
    z-index:10
}
}

Desktop :-

Mobile device :-

1 Like

Is it possible to have the text and button in the centre as well. It doesn’t give me the option within the theme to do so.

1 Like

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > theme.css and paste this at the bottom of the file:
.content-over-media.full-bleed.text-custom .place-self-start-center {
max-width: 100%;
}
@media (max-width:767px){
.section-stack {
position: relative;
}
.section-header.md\:hidden {
position: absolute;
top: 37%;
z-index:10
}
}
1 Like

Sorry i was not clear in my description. It still needs to be at the top, i guess top-centre instead of lower down.

1 Like

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > theme.css and paste this at the bottom of the file:
.content-over-media.full-bleed.text-custom .place-self-start-center {
    max-width: 100%;
}
@media (max-width:767px){
.section-stack {
    position: relative;
}
.section-header.md\:hidden {
    position: absolute;
    top: 4%;
    z-index:10
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    text-align: center;
}
}

1 Like

The text disappears when on mobile - it is not like your screenshot.

1 Like

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > theme.css and paste this at the bottom of the file:
.content-over-media.full-bleed.text-custom .place-self-start-center {
    max-width: 100%;
}
@media (max-width:767px){
.section-stack {
    position: relative;
}
.section-header.md\:hidden {
    position: absolute;
    top: 4%;
    z-index:10;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    text-align: center;
}
.prose {
    text-align: center;
    margin: 0 auto;
}
}

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > theme.css and paste this at the bottom of the file:
.content-over-media.full-bleed.text-custom .place-self-start-center {
    max-width: 100%;
}
@media (max-width:767px){
.section-stack {
    position: relative;
}
.section-header.md\:hidden {
    position: absolute;
    top: 4%;
    z-index:10;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    text-align: center;
}
.prose {
    text-align: center;
    margin: 0 auto;
}
}
1 Like

Thank you so much! This work perfectly. Appreciate your help and patience. I do have a separate forum question i would love answering, but you have given me lots of your time already so understand if not.

https://community.shopify.com/c/shopify-design/product-page-unique-boxes/td-p/2091262