CSS to Increase video size on mobile only.

Solved

CSS to Increase video size on mobile only.

Exodusllc
Tourist
5 0 2

Hello, can you assist me. Based upon your work here, my question is along the lines of this topic. I have added a video to my website by adding a "Custom Liquid" section. The video consist of only text and it is shown on both Desktop and Mobile. However, on mobile, the video is extremely small. Can the existing code be modified to make the video larger on Mobile? Here is the code being used (Note that I replace my website with "web address goes here".

<style>
video {
width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
</style>
<video muted autoplay playsinline loop>
<source src="web address goes here">
<source src="web address goes here">
</video>

 

Similar threads to:
padding size in mobile view for policy page

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
9567 2279 2828

This is an accepted solution.

Hi @Exodusllc 

Please, share your store URL. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

View solution in original post

Replies 6 (6)

Made4uo-Ribe
Shopify Partner
9567 2279 2828

This is an accepted solution.

Hi @Exodusllc 

Please, share your store URL. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.
Exodusllc
Tourist
5 0 2

Hello, do you have a recommendation I can try simply by modifying the shown CSS😁?

Exodusllc
Tourist
5 0 2

Thank you for your support.  You solution works perfectly!!!!

I just needed to copy, paste and change the links.  Thanks again!

 

<style>
/* General Styles */
video {
width: 100%;
height: auto;
display: block;
margin: 0 auto;
}

/* Hide Mobile Video on Desktop */
.desktop-video {
display: none;
}

/* Hide Desktop Video on Mobile */
.mobile-video {
display: none;
}

/* Show Desktop Video for Larger Screens */
@media (min-width: 768px) {
.desktop-video {
display: block;
}
}

/* Show Mobile Video for Smaller Screens */
@media (max-width: 767px) {
.mobile-video {
display: block;
}
}
</style>

<!-- Desktop Video -->
<video class="desktop-video" muted autoplay playsinline loop>
<source src="desktop-video.mp4" type="video/mp4">
</video>

<!-- Mobile Video -->
<video class="mobile-video" muted autoplay playsinline loop>
<source src="mobile-video.mp4" type="video/mp4">
</video>

Made4uo-Ribe
Shopify Partner
9567 2279 2828

Oh, you posted ahead of me. Welcome! Would you mind hitting 'like' as well? Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

DaisyVo
Shopify Partner
2370 297 340

Hi @Exodusllc 

 

Please share your store URL so I can take a closer look

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
Exodusllc
Tourist
5 0 2

Is there another way to share my store link?  I prefer not to share on a forum.