'How do you make posts shift up if there is free space in WordPress?
In the screenshot below, you can see that at the end of my posts, there is a lot of space left over in the block. I am trying to find a way to cut off the remaining space and shift up the post that is below it.
I am currently using the 2022 Wordpress theme, and I edited it with the following css.
ul.wp-block-post-template {
display: flex;
flex-wrap: wrap;
}
li.wp-block-post {
background-color: #eee;
flex-basis: 200px;
margin: 10px;
padding: 0px 20px;
flex: 1;
}
If there is a WordPress plugin that could do this, that would be wonderful. Otherwise, I would love to have some CSS that could do this for me.
I tried finding a WordPress plugin, but I found mostly plugins that display the content in an even grid with a "read more" button, which isn't what I want. Unfortunately, what I am trying to do seems to be rather uncommon, making it hard to find any plugins or resources on how to do it.
Solution 1:[1]
Hey there as i know you want to same height as well as cover the extra space left by the post. As i see in screenshot it's confirmed that you don't need to change any height elements. But for extra space you can define text overflow. By this you can enjoy extra text will be hidden. CSS property for it-
text-overflow: ellipsis;
After this code output like-
Text here.....
Sorry for i couldn't test it with your WordPress code. Hope you like my answer.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Varun Kaklia |

