Some CSS challenges are so far out that it is even hard to find a headline for sharing them. Letting images speak, I simply didn’t like that the buttons are not aligned when I create a certain sequence of modules in a multi-column row, like in this example an image followed by a text of different length (by the way, most websites solve this issue by writing texts of same length, a limitation I would like to avoid) followed by a button.

wordpress-divi-theme_multi-colum-row-buttons-bottom-align-01

DIVI offers to equalize the column height, which needs to be activated for our CSS trick, but it doesn’t solve the issue in itself. Also it would be possible to give all images, all text modules and all buttons their own row, which would result in the desired alignment, BUT the responsive behaviour is not correct, because on small screens appear now the three images followed by three texts followed by three buttons, obviously not an option. So let’s drop this idea and set our row to equal column heights to have our containers reach to the same baseline. Also, to address only that one row and not by accident messing up other constructions, we assing a CSS class to that row, in our example align-bottom-column.

wordpress-divi-theme_multi-colum-row-buttons-bottom-align-02

Now here comes the trick to bottom align the button modules. We catch the container-div of the button module (if you want to apply this trick with other modules at the bottom, you need to use their class instead) and set it to position: absolute and bottom: 0 to align it at the baseline. The left, right and margin entries are centering it, and in case you don’t want center alignment, just drop those. Since the absolute positioning is not taking care for the text, the buttons would overlap the last lines, so we give the column itself some padding down there. Here comes a caveat, because if on certain screen sizes the button text would become two lines, therefore the button higher, it would again collapse. I kept the button text short, which is at least easier then keeping the text at same length.

wordpress-divi-theme_multi-colum-row-buttons-bottom-align-03

Voilá, multi-column call-to-action as my aim for perfection likes it. I hoped to find a solution with display: table or even flexbox, which might allow even variable button heights, but I was not able to figure something out. If you have a more flexible solution, please let us know.