How to Align Table Data in Bootstrap 3 in Drupal 8.5.x

By peterm, 6 June, 2018

I wanted to create a Drupal 8 view and in one column use Custom Text to output a Bootstrap button. After much wrangling, this is what I came up with.

You should start with the Settings for the Bootstrap Table view and make sure to set the Align for the column with the Custom Text.

table settings

This is what our typical list view should look like.

view list

The Custom Text More Info, is then given these attributes.

custom settings

Finally, we need a CSS rule. My aahhaa moment was that Bootstrap is very specific in its selectors. After using Friefox to copy the unique selector, I was then able to add a little snippet of vert-aligned that I found on Stack Overflow.

css rule