Display a section on Mobile

Hi.

I have been having some trouble in order to hide sections of a template in the mobile version I was able to do so in a tablet but when it comes to a smartphone it is not hiding the section.

PD: this is the code i’m using in order to do so:

@media (max-width:478px){

.content__show{
display:none !important;
}

}

anyone can help me out in order to figure out how does Hubspot manages information when is on mobile screens, especially on smartphones?

By the way i’m also needing some stuff to be shown on mobile and not on desktop and its giving me the same issue

Hi @Juan_Garza,

Your code is right with mobile but there is more CSS code with some parent class targeting.

Can you please send page link so I can tell you what’s a real problem?

Team TRooInbound.

http://www-vantech-com-co.sandbox.hs-sites.com/home-2017?hs_preview=GPMNfLBk-5400611112

Hi @Juan_Garza,

I have found some media query on your page like,

@media (max-width: 1139px) and (min-width: 768px)
 .content__show {
 display: none !important;
 }}

so it’s work in between screen size 1139px and 768px and display:none your content and again show in 0px to 767px screen size.

So if you want to hide it in all 0 to 767px screen size

write this code in your CSS stylesheet

@media (max-width: 767px) {
 .content__show {
 display: none !important;
 }
}

hope this works, let me know if not working

Did my post help answer your query? Help the Community by marking it as a solution.

Team TRooInbound

I have already tried also to do so the way you told mee, but i only need to be hidden for screens lower than 480

Hi @Juan_Garza,

I think you did it with my instruction and want to hidden section in below section just remove other unwanted media queries and add below CSS syntax to

.content__show {
 display: block !important;
 }

@media (max-width: 480px) {
 .content__show {
 display: none !important;
 }
}

Hope this work!

Please mark this as solution if this right solution

Team TRooInbound

Really!? from the script? Genius! (pls insert sarcasm)

HI, I have another question in regards this, now on the desktop is showing up an empty space where the content should be hidden.

Any advice on this?