CMS Development

janabarrett
Participant

Vertically align images in row

SOLVE

I'm new at HubSpot templates and trying to figure out how to center-align instead of top-align these logos.

 

Screen Shot 2018-12-26 at 6.15.55 PM.pngI've tried playing around with flex boxes but don't quite know what I'm doing. Any help would be appreciated. Here's the page I'm working on: https://info.honeycomb.io/test-lp

 

0 Upvotes
1 Accepted solution
jzilch
Solution
HubSpot Employee
HubSpot Employee

Vertically align images in row

SOLVE

@janabarrett When I am vertically aligning items such as these I like to use Flexbox as it has a pretty good browser support and should be more performant than trying to use absolute positioning as that will cause a browser re-paint. I took a look at the structure and you should be able to add display flex to the parent of these images and then set the align-items attribute to center. That implementation would look something like the following. 

 

 

..container.logo-tile-wrapper div.row-fluid {
  display: flex;
  align-items: center;
}

 

 

I would also suggest removing the period from the beginning of the class name. When adding names to the classes added to a module you don't need to add a period at the front of the class name. 

View solution in original post

2 Replies 2
jzilch
Solution
HubSpot Employee
HubSpot Employee

Vertically align images in row

SOLVE

@janabarrett When I am vertically aligning items such as these I like to use Flexbox as it has a pretty good browser support and should be more performant than trying to use absolute positioning as that will cause a browser re-paint. I took a look at the structure and you should be able to add display flex to the parent of these images and then set the align-items attribute to center. That implementation would look something like the following. 

 

 

..container.logo-tile-wrapper div.row-fluid {
  display: flex;
  align-items: center;
}

 

 

I would also suggest removing the period from the beginning of the class name. When adding names to the classes added to a module you don't need to add a period at the front of the class name. 

janabarrett
Participant

Vertically align images in row

SOLVE

Brilliant! Thanks so much @jzilch - that solved it for me 🙂

0 Upvotes