Zoom in cover image, if aspect ratio doesn't fit image
-
Hi together,
first of all, I must once again thank you deeply for creating this theme!A few days ago, I recognized a minor issue using the cover feature. I use a image with aspect ratio 2/3. If the ratio is wider the image is cropped, so it fits the screen. In opposite if the ratio is narrower, the image shows up fully with a white (or grey) bar underneath.
Im my opinion it would be better not to fill up the image with a bar but to crop the image left and right instead to fit into the browser.I don't know, if this can be solved with css, tried something, but actually I didn't know which class I need to adress.
Thanks in advance and cheers!
SebastianPS. If you want to see, what I describe, visit my website and change size of you browser window. ;-)
-
Dear @neunzehnachtneun
you can set the image as a background image.
Then it always fits the screen.Best!
Marius
-
Well, this is an unexpected solution. But it works.
Thanks! -
Dear @neunzehnachtneun
happy it works!
Best!Marius
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it