XF 2.2 How do I make the last replies info always sit at the bottom of the thread list block in mobile view?

gogo

Well-known member
I increased the thread bock height by changing the height of .structItem-cell.structItem-cell--icon .

How do I make the highlighted "last message info (replies count, date) line" to the bottom of the block in mobile view?

1600055729357.png
 
Last edited:
Try this in extra.less

[EDITED to be correct!]

Code:
@media (max-width: @xf-responsiveMedium)

{

.structItem-cell.structItem-cell--meta

{margin-top:40px}}

I'm not able to test right now but if you do that you may not need to change the height .

Or you might do it with position.
 
Last edited:
Try this in extra.less

Code:
@media (max-width: @xf-responsiveMedium)

{

.structItem-cell structItem-cell--meta

{margin-top:40px}}

I'm not able to test right now but if you do that you may not need to change the height .

Or you might do it with position.

The larger height is by design. I did it on purpose. And I want to make the line of last post date, reply count sit on the bottom of the block.

Thanks for your code but it doesn't work.
 
Add this: .structItem-cell.structItem-cell--latest

So

Code:
@media (max-width: @xf-responsiveMedium)

{

.structItem-cell.structItem-cell--meta,.structItem-cell.structItem-cell--latest

{margin-top:40px}}
 
Is there something like margin-bottom:0px i.e. positioned 0px from the bottom (I tried this, no effect)

Because margin-top:40px will make the block taller if there are more lines of thread title.
 
Add this: .structItem-cell.structItem-cell--latest

So

Code:
@media (max-width: @xf-responsiveMedium)

{

.structItem-cell.structItem-cell--meta,.structItem-cell.structItem-cell--latest

{margin-top:40px}}

It works. Both items sits on the bottom. But the block height now depends on the number of lines of thread title. The more lines the taller the block is.. I want the block height being kept the same. The longer thread title won't increase the block height. Only squeezes the white space in between.
 
You can do it with position instead of margin then:

Code:
@media (max-width: @xf-responsiveMedium)

{.structItem-cell.structItem-cell--meta,.structItem-cell.structItem-cell--latest

{position:relative;
    top:30px;}
    }
 
OK, then the only way I can think is to have a min-height for .structItem-title, which still requires numbers to take into account the possiblity of two lines. But I don't think you want this:

Screenshot 2020-09-14 at 12.36.34.png

Otherwise you need the help of somebody cleverer than I am, maybe with position:bottom:0px :)
 
Last edited:
The info of the thread starter should stick to the title instead of floating in the middle of the block. And the info of the replies count and last post date should stick to the bottom line. The empty space in the middle will squeeze or expand depending how much lines the title occupies.

IMG_20200914_210719.webp


I truly appreciate your help and that gives me some thoughts to my problem. This is a tricky requirement that maybe difficult to solve...
 
The info of the thread starter should stick to the title instead of floating in the middle of the block. And the info of the replies count and last post date should stick to the bottom line.
Yes, that's why I said I don't think it is what you want. As the title alters the height depending on whether it is one line or two , that is why I suggested the minimum height so it stays the same whether it's one or two, but obviously when it is one line, the second line is empty.
 
Top Bottom