Center td.posters container

I could use a little css/flex assistance. I have been working on making the avatar of the original poster larger than the rest of the avatars and have figured everything out except how to center td.posters

I have used the method described here How to increase avatars size on Latest without making them blurred and modified it work with the original rather than latest. Here is my css:

td > a:first-child > img:first-child {
    height: 50px;
    width: 50px;
    margin-right: 3px;
}
  
td.posters {
    display: flex;
    align-items: center;
    margin-right: 25px;

  img.avatar {
    height: 25px;
    width: 25px;
  }
}

.topic-list .posters a:first-child .avatar.latest:not(.single) {
    top: 1px;
    bottom: 1px;
}

.topic-list td.posters {
        height: 54px;
}

Below I marked what I want to be centered between the dashed arrows. Here’s a link to my site.

I tried increasing the height of td.containers, but that only works on categories where I’m using the topic previews, in other categories where that is turned off it makes the spacing too large. I could target those categories to reduce the height but would prefer not to if there is an easier way. Thanks!

You may wish to hire someone experienced with CSS to assist you?

Todavía no he encontrado una solución para esto después de 3 años :laughing: Le pedí a otra persona que lo viera, pero tampoco pudo resolverlo :man_shrugging:

Con un display: flex en el \u003ctd\u003e, no estoy seguro de que esto sea posible sin añadir un poco de HTML :thinking:

Si eliminas el display: flex de .td.posters, centrará verticalmente los avatares, independientemente de la altura de la fila.

Sin embargo, la celda que contiene los avatares .topic-list .posters.theme-avatar-medium, que tiene un ancho fijo, es un poco corta (176px) y el último avatar pasará a una nueva línea. Si la aumentas a 187px, parece que encaja.

Entonces, los avatares no estarán exactamente a la misma altura porque el primero es más grande, lo que se puede solucionar con:

.topic-list .posters\u003ea:first-child {
    margin-top: -4px;
}

1 me gusta