E
E
elenapetrova19952021-06-11 16:15:57
css
elenapetrova1995, 2021-06-11 16:15:57

How to center the H1 underline on the page?

There is a page, you need to display a h1 heading in the center on it, which should be underlined with a line of 5 pixels and red colors?
How can I make this underline line within the heading, and not the full width of the block, or a static underline width?
60c362049137c523810893.png
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2021-06-11
@firedragon

Margin auto for the header, it will push it to the center of the parent

V
valgerofficial, 2021-06-11
@valgerofficial

Like this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question