Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I d like to have a fixed height on the slideshow and, possibly centered images. When using images as backgrounds you can easily do that with the background-size: cover css property, not so easy with an img element.
tx
Simone
Comments
Comment #1
nevets CreditAttribution: nevets commentedYou can apply the css height attribute to an image (img) tag.
Comment #2
cimo75 CreditAttribution: cimo75 commentedI don't think that this will solve my issue, if you apply an height property to the image element you ll probably get a distorted image as the width is fluid.
Comment #3
nevets CreditAttribution: nevets commentedYou should be able to set the height and width to auto (I know the reverse works)
Comment #4
cimo75 CreditAttribution: cimo75 commentedIf set the width and height to auto then it is not responsive!
Comment #5
mengi CreditAttribution: mengi commenteduse max-height and max-width instead.
Comment #6
duntuk CreditAttribution: duntuk commented"use max-height and max-width instead"
That doesn't really work. After max is reached, the image starts getting distorted.