Vertical centering in picture elements

I’ve just completed my floorplan using picture elements. This was realatively easier than I was expecting (nice)

but the floating positioning using ‘left’ and ‘top’ in CSS is getting me insane (I know just the basics I must admit). This ofc refers to the middle of the box of a given card and, although annoying to place, it works…statically

But when I use the searchbox, the limitation of this positioning dramatically shows.

is there a different way for positioning the card from the top, so it won’t scroll up?

This is the code I’m using to place the element:

    - type: custom:search-card
      max_results: 10
      style:
        top: 8%
        left: 25%
        width: 30%

tnx in advance for any suggestion!

Have a play with the transform item within the style item.

    style:
      left: 50%
      top: 2.5%
      width: 32%
      transform: translate(-50%, 0%)

You can change how elements are positioned.

1 Like

awesome! works perectly! tnx allot!

1 Like