Vertical-align of images

Created on 16 September 2024, 3 months ago
Updated 17 September 2024, 3 months ago

In the solo-global.css at line 71 there is:

img {
  vertical-align: middle;
}

This creates problems with inline images (fig. 1).
Is it possible to delete it (fig. 2) and possibly add a class only if necessary?

. middle {
  vertical-align: middle;
}

Thanks and best regards

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy giordy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @giordy
  • 🇺🇸United States flashwebcenter Austin TX

    Hello,

    While I can't change the global settings for the img HTML tag directly, you can reset the CSS for the img element, removing the vertical-align: middle;, you can simply override it by setting vertical-align to its default value. The default value for vertical-align is baseline. Here's how you can reset it:

    img {
      vertical-align: baseline;
    }

    Best wishes,
    Alaa

  • 🇮🇹Italy giordy

    Thanks, it works but I had to add !important.

    Unfortunately, it doesn't work in images:

    . middle {
    vertical-align: middle;
    }

    but it's not important.

    Thanks and best regards

  • 🇮🇳India Tirupati_Singh

    Hi @giordy, it seems that the CSS property for the middle class is not being applied because you have added space just after the dot(.) class selector. Please use the below code and check if it works for you.

    .middle {
    vertical-align: middle;
    }

    Thanks!

  • 🇮🇹Italy giordy

    Thanks, I didn't notice the space. It works now.

  • 🇺🇸United States flashwebcenter Austin TX
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024