Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I increase the size of background of h1? CSS

This is the problem I have. I couldn’t solve it. I think it’s because I’ve just started learning something and then I tried the make my own little project to practice.

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In your h1 you are setting the padding to be 0 10px, whereas the second value determines the padding for each side of the x-axis. Would you reach your goal if you just set the padding of the h1 to be padding: 10px?

You could possibly add the h1-tag within a parent-container and specify the width and height of that and then center-align the h1.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading