CMS Development

Camilla_02
Participant

Hide background image on mobile

SOLVE

Hi, 

 

I am trying to change the background image on the following site into just plain color on mobile device: https://www.vitalsmarts.dk/sund-high-performance

 

I saw someone had succed adding the following css to the Head HTML under advance settings on the page, however it does not work for us.

 

<style>
  @media (max-width: 479px) {
    .marquee {
       background: #0C2E4E !important;
    }
  }
</style>

 Does anyone have an idea on how I can fix this? 

 

Thank you!

2 Accepted solutions
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hide background image on mobile

SOLVE

@Camilla_02 Change .marquee to .dnd_area_main_banner-row-0-background-image as that's the class that the background is being set on. Since it's Drag and Drop that class is dynamically generated so just keep in mind if you ever place something above that section the class will change (though since it's your hero I can't imagine you'd ever end up doing that, but wanted to point it out just in case).

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

rlopez
Solution
Key Advisor

Hide background image on mobile

SOLVE

Hi @Camilla_02 🙂

 

I can't test it, but I think that you need something like this:

<style>
  @media (max-width: 479px) {
    .dnd_area_main_banner-row-0-background-image {
       background: #0C2E4E;
       background-image: none;
    }
  }
</style>

 

I hope this code solve your problem. I'll wait for your response.

 

Regards, 

 

Rafael López.

 


[ Si esta publicación te ha ayudado con tu problema ayuda a la comunidad marcándola como solución ]
[ If this response helped you, please mark it as a solution ]

Rafael López
Head of Marketing
Odontonet by Glintt


HubSpot Community Champion

linkedininstagram

View solution in original post

5 Replies 5
Camilla_02
Participant

Hide background image on mobile

SOLVE

Thank you @alyssamwilie and @rlopez it works! I really am no expert in CSS and have been struggeling with this for hours, I truly appreciate your help!

rlopez
Key Advisor

Hide background image on mobile

SOLVE

Hello @Camilla_02.

 

It was a pleasure 🙂

 

Regards,

 

Rafael López


[ Si esta publicación te ha ayudado con tu problema ayuda a la comunidad marcándola como solución ]
[ If this response helped you, please mark it as a solution ]

Rafael López
Head of Marketing
Odontonet by Glintt


HubSpot Community Champion

linkedininstagram
rlopez
Solution
Key Advisor

Hide background image on mobile

SOLVE

Hi @Camilla_02 🙂

 

I can't test it, but I think that you need something like this:

<style>
  @media (max-width: 479px) {
    .dnd_area_main_banner-row-0-background-image {
       background: #0C2E4E;
       background-image: none;
    }
  }
</style>

 

I hope this code solve your problem. I'll wait for your response.

 

Regards, 

 

Rafael López.

 


[ Si esta publicación te ha ayudado con tu problema ayuda a la comunidad marcándola como solución ]
[ If this response helped you, please mark it as a solution ]

Rafael López
Head of Marketing
Odontonet by Glintt


HubSpot Community Champion

linkedininstagram
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hide background image on mobile

SOLVE

@Camilla_02 Change .marquee to .dnd_area_main_banner-row-0-background-image as that's the class that the background is being set on. Since it's Drag and Drop that class is dynamically generated so just keep in mind if you ever place something above that section the class will change (though since it's your hero I can't imagine you'd ever end up doing that, but wanted to point it out just in case).

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
rlopez
Key Advisor

Hide background image on mobile

SOLVE

Hi @alyssamwilie 🙂

 

I agree with your observation.

 

Regards,

 

Rafael López


[ Si esta publicación te ha ayudado con tu problema ayuda a la comunidad marcándola como solución ]
[ If this response helped you, please mark it as a solution ]

Rafael López
Head of Marketing
Odontonet by Glintt


HubSpot Community Champion

linkedininstagram