2

I need to center align the text on the tiles of promoted links, which it does, but not consistently to all the tiles in all the lines when I use the CSS below. What am I missing?

<style>
.ms-tileview-tile-titleTextSmallCollapsed,
.ms-tileview-tile-titleTextMediumCollapsed,
.ms-tileview-tile-titleTextSmallExpanded,
.ms-tileview-tile-titleTextMediumExpanded 
{text-align:center}
</style>
  • Can you add screenshot to have clear understanding of your ask ? – Bhaskar Dhone Jun 13 '17 at 11:43
2

One would guess that text-align: center itself would do the job, but because the promoted links have a modified display-attribute, they no longer conform to display: block, which takes all the available space and respects the styling of center. However, by changing back to display: block, the functionality still works so it's alright to add it to the code.

The following does the job:

.ms-tileview-tile-titleMedium,
.ms-tileview-tile-titleMediumCollapsed,
.ms-tileview-tile-titleMediumExpanded,
.ms-tileview-tile-titleSmall,
.ms-tileview-tile-titleSmallCollapsed,
.ms-tileview-tile-titleSmallExpanded,
.ms-tileview-tile-descriptionMedium {
    display: block;
    text-align: center;
}

If you only want to apply the changes to the body text, you need to have .ms-tileview-tile-descriptionMedium on the selected elements, and vice versa.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.