Site logo

Archived topic

Vertical align text for all headers (h1, h2, etc.) and paragraphs

7 replies · Started by vikingruler on September 1, 2018

Viewing posts 1–8 of 8

Hello there,

Can you please assist me.

I am trying to vertical align all text for all headers (h1, h2, etc.) and paragraphs, across my whole site.

It is important that the text remain vertically aligned, even if the line-height is increased or decreased.

Thank you.

Kallad

Hi there,

Can't really picture the problem.

Any chance you can link us to the site in question?

You can edit the original topic and use the private URL field.

Let me know :)

Hello Leo,

I have just sent the link to you - take a look at the h1 header.

I want the text to position in the middle (vertically), of the two lines (line-height), and not at the bottom.

Thank you.

Hello there.

I am not quite sure of the best terminology to use, but I think the best way to explain what I am after is to use the vertical alignment function available for an MS Excel Document...

There 3 options available to align text within a cell:

1) Bottom align
2) Middle align
3) Top align

Wordpress, by default (if I am correct), automatically bottom aligns all text (for all headers and paragraphs).

What I wanted to know is: Is there a way to 'override' this default setting (with CSS hopefully), so that I can 'Middle align' all text (for all headers and paragraphs), across my site?

I am a bit particular, and like things to 'line up', so an image lying 1px above the text, in a horizontal post summary in a category archive, is a bit challenging for me.

All the best.

Kallad

Hi there,

there a methods to vertically align text, but this is generally for a single line of text in a container or a table cell. Not something that you would apply to paragraphs of text.

The better method is to adjust the line height of the text. Which you can set for each in the Customiser > Typography. Let me know.

Thank you David.

Sorry for the delay in getting back to you.

I will live with the line height.

All the best.

Kallad

You're welcome. :)

This archived topic is closed to new replies.