I am a student and learning wordpress. I started with the Underscore_s starter theme. For a wesbite I want to centre align the custom header but I am unable to do so. I created a class in CSS named “Headimg” and assigned the class to img in Header.PHP. Which I don’t think is the correct way to do it, is it?

Header.PHP

<img class="headimg" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="TCET R&D" >

CSS-

.headimg{
padding-top: 40px;
display: block;
margin-left: auto;
margin-right: auto;}

Read more here: How to Centre align my header image in Underscore_S


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: