How can I hide a video on desktop but keep it on mobile view?

Hi,

Can someone help me hide a video on desktop but keep on mobile view. The video is just too big on desktop but look perfect on mobile.

I’m using a custom liquid with this code

video { width: 100%; height: auto; display: block; margin: 0 auto; }

and the theme is Studio.

Please give me step by step instructions. I’m still pretty new and sometimes don’t understand :slightly_smiling_face:

Thank you.

Hi @valerie92
In this case you can add a class for video like this


Then add this css into CSS file

@media(min-width: 767px){
.hidden-desktop{
display: none;
}
}

It worked! Thank you so much :slightly_smiling_face:

Hi Michael,

I am still having issues with this code, are you able to assist? Thank you!