Vertical align header text within the header class

gastoff
gastoff

I've added code to adjust the h3 headers so that they are 75px tall and have a background. I figured out how to get the header text to be centered horizontally within the h3 element, but I cannot figure out how to adjust its vertical position:

If I try to use padding or margin, it adds it to the outside of the element, which moves the background and text together. When I try to use "background-position" with a negative vertical offset, it causes the top of the background image to be cut off. Is there a vertical version of "text-indent" that can be used to bump the text down within the header element so that it rests within the scroll body?

image

Comments

Sign In or Register to comment.

Campaign of the Month
October 2021

Hogwarts and the Magic of the Founders


Read the feature post on the blog!
Or return to Obsidian Portal!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions