Vertically center elements within a DIV

Highlighted
New Member
15 0 0

Hi!

 

I have a super short question. You can see on my page:

https://ramsign.com/collections/all-products

...that the elements (my clickable products) are not displayed vertically centered in the tiles.

They all are on top of the tiles. This does not look super horrible, but is not the ideal situation. I would like to center them vertically into the tiles. Unfortunately I cannot make it, although I checked multiple related topics here. But none of the codes work for me. Thanks for your help!

0 Likes
Pathfinder
122 6 6

@Nick5 hey nick

i might misunderstood this but is this what you want ? 

ver.png

0 Likes
New Member
15 0 0

Hi Emir,

 

my products are not aligned in the center of the tiles. I visualized it here:

2019-04-01_15-25-38.png

The products should be in the vertical middle.

 

Thanks

0 Likes
Pathfinder
122 6 6

@Nick5  the picture i have posted is edited by me i have centered it please tell me if you want it like the picture i have attached in my last replay or ?

 

1 Like
New Member
15 0 0

yes

0 Likes
Pathfinder
122 6 6

add this to the end of your styling file it should be in the assest files should also be called theme.scss but sometimes diffrente name from theme to theme

make sure you duplicate your theme if you are not code expert in case any problem happend

put this code at the end 

@Nick5 

and after done check your store whole pages home pages and collections and every thing in case something else changes with it maybe there will be a change in home page too i will be here to help 

 

/*=================== =================== ===================*/
.grid-view-item__link {padding-top: 70px;}
/*=================== =================== ===================*/
0 Likes
New Member
15 0 0

Hi,

this would definitely not work since I have tiles of different sizes..

and then the product would appear totally out of the borders of the tiles if I move them with an absolute value like 70px.

 

But thx anyway

0 Likes
Pathfinder
122 6 6

actually it does work i already posted the picture in my frist replay with this code you can see it does work and its centered as you wanted and as you agreed 

0 Likes