Hi
I want to embed a video via “user interaction” with preview image. but the image size is set to 100% fullwidth like this:
How can is set the preview size to e.g. max-width 400px and max-height 300px ?
Kind regards
Velli
Hey Alexander,
Sorry for the late reply, please link to the page so we can help adjust.
Best regards,
Mike
Hi,
Thanks for the link, the following css will set the width to 400px and then the natural height is 266px, so in the code you will see height set to auto, you can change it to 300px, but then the image is skewed a little, please try both ways and see which you like. I assumed you would want the image centered so I added “margin: auto;” but you can remove this if you wish.
Another option is to use the Simple Image Sizes plugin, this would let you change the image sizes for every type in WordPress, check out this tutorial.
Anyways here is the css, Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:
#top #main .big-preview a img {
width: 400px !important;
height: auto;
margin: auto;
}
Best regards,
Mike