css - Images at the same vertical position in multiple columns

I have in a page a multiple column layout (in my case 5 columns, but that doesn't really matter). In each column, I

I have in a page a multiple column layout (in my case 5 columns, but that doesn't really matter). In each column, I have a heading, then an image and then some text, so like so: Heading 1 Heading2 Image 1 Image2 Text 1 Text2

However, the headings are too long to fit on one line, so sometimes they have to be broken into 2 or even 3 lines. Because the headings are different, this in effect causes the images to be at a different vertical position.I would like for all of the images to be at the same vertical position - basically in line accros all the columns.

The only idea on how to do that was to use 2 "Columns" blocks, one for the headings, another for the images and the text. That however doesn't really work on mobile, because there I want it like this: Heading 1 Image 1 Text 1 Heading 2 Image 2 Text 2

and having two separate column layouts would print both headings first, followed by the rest of the content.

I am open to using hand-written CSS or JS, but I don't have a clue how... My theme is GeneratePress if that is of any use.

I have in a page a multiple column layout (in my case 5 columns, but that doesn't really matter). In each column, I have a heading, then an image and then some text, so like so: Heading 1 Heading2 Image 1 Image2 Text 1 Text2

However, the headings are too long to fit on one line, so sometimes they have to be broken into 2 or even 3 lines. Because the headings are different, this in effect causes the images to be at a different vertical position.I would like for all of the images to be at the same vertical position - basically in line accros all the columns.

The only idea on how to do that was to use 2 "Columns" blocks, one for the headings, another for the images and the text. That however doesn't really work on mobile, because there I want it like this: Heading 1 Image 1 Text 1 Heading 2 Image 2 Text 2

and having two separate column layouts would print both headings first, followed by the rest of the content.

I am open to using hand-written CSS or JS, but I don't have a clue how... My theme is GeneratePress if that is of any use.

Share Improve this question asked Sep 30, 2019 at 14:49 Marek DědičMarek Dědič 12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

This is more of an html question but, you'd have to write a theme, or at least a child theme.

An absolutely terrible way to do this would be with tables ... but, that'd probably be the easiest way. Something more like this would be sufficient:

<div class="row">title 1, title 2</div>
<div class="row">image 1, image 2</div>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745116765a4612174.html

相关推荐

  • css - Images at the same vertical position in multiple columns

    I have in a page a multiple column layout (in my case 5 columns, but that doesn't really matter). In each column, I

    7小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信