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 vertically center an "a" in a list near an image?

How can I vertically center the text "PAYPAL" "CREDIT CARD" and "CRYPTO" near the image?

.payments-nav ol li {
  display: inline-block;
  background-color: red;
}
<div class="payments-nav">
  <ol class="payments-nav-links">
    <li class="paypal">
      <a href="paypal-shop.html"><img src="img/paypal.png" alt="paypal-img" class="paypal-img" />CREDIT CARD</a>
    </li>
    <li class="card">
      <a href="card-shop.html"><img src="img/credit-card.png" alt="creditcard-img" class="creditcard-img" />CREDIT CARD</a>
    </li>
    <li class="crypto">
      <a href="crypto-shop.html"><img src="img/crypto.png" alt="crypto-img" class="crypto-img" />CRYPTO</a>
    </li>
  </ol>
</div>

screenshot 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 :

CSS:

.payments-nav-links li a {display: flex; align-items: center;}
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