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 to put the first p tag in the middle of the second p tag below it

I need to column align the two p tags on the right of the screen, as shown in the code below:

.divsignature{
  font-weight: bold;
  float:right;
  }

.signature{
  padding: 15px 30px 10px 0px;
}
<div class="divsignature">
  <p class="signaturetext">Signature for acceptance</p>
  <p class="signature">__________________________________</p>
</div>

But I want the writing "Signature for acceptance" to be in the center with respect to the line below, i.e. with respect to the p tag with class signature.

Can anyone kindly help me?

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 :

Use this;

.divsignature{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-weight: bold;
    float: right;
}

/* Remove the .signature padding */

or

.divsignature {
    text-align: center;
    font-weight: bold;
}

.signaturetext {
    text-align: center;
}

/* Remove the .signature padding */

Whichever works best for you.

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