XF 2.2 Styling / aligning article preview images

johnbd

Member
Have a query regarding aligning images in the article preview view.

Would be good to somehow define whether the preview image is vertically aligned to the top, centre or bottom depending on the image.

The default seems to be centre aligned which looked awkard with the images related to the forum.

As such updated the following in message.less

CSS:
.articlePreview-image
    {
        flex: 0 0 auto;
        align-self: center;
        width: 100%;
        max-width: 750px;
        background: center top / cover @xf-contentAltBg no-repeat;
        text-decoration: none;

This at least ensures the images are vertically aligned to the top which with the bicycles is less awkward, looks better chopping the tyres than the saddle. Example below as it stands.

Anyhow would be nice to select when posting vertical alignment. Not sure if this could be achieved through custom bbcode or whether I'm out of luck.

1617222993094.png
 
Back
Top Bottom