XF 2.2 Vertically align text with image?

jromaine

Member
Hi guys,
How can I align this text so that it sits in the middle of the image icon, rather than at the bottom?

How it looks now.

1657628459267.png

How I want it to look

1657628499564.png
 

Mr Lucky

Well-known member
Normally you put custom CS stying isn the extra/less template for the style.

In this case you'd either style the image in the html where you have the actual image (e.g. <img style ="vertical-align:middle" src ="whateverthe source is" /)>

Or else give the image a class e.g. <img class="mid" src ="whateverthe source is" /)> and then add to the extra/less template:

Code:
.mid
{vertical-align:middle}
 

RobinHood

Well-known member
Apply alt text of "icon" to the image, and add this to extra.less

CSS:
.message-content .bbWrapper img[alt=icon] {
    vertical-align: middle;
}

 
Last edited:
Top