How to center download button and reduce the size?

0

Issue

How to center a button and make it smaller than shown in the image?

HTML:

<a href="SUJITBANNE.pdf" download="SUJITBANNE" class="cv">Download CV</a>

CSS-

.cv {
  position: relative;
  background: #080808;
  display: inline-block;
  color: #fff;
  padding: 10px 30px;
  font-size: 18px;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 2px;
  font-weight: 500;
  text-align: center;
  width: 100%;
  margin-bottom: 30px;
}

Solution

Here you Go

    .cv {
      position: relative;
      background: #080808;
      display: inline-block;
      color: #fff;
      padding: 10px 30px;
      font-size: 18px;
      text-transform: uppercase;
      text-decoration: none;
      letter-spacing: 2px;
      font-weight: 500;
      text-align: center;
      width: 30%;
      margin-bottom: 30px;
    }
    div{
    display: flex;
    justify-content: center;
    align-items: center;
    }
<div>
   <a href="SUJITBANNE.pdf" download="SUJITBANNE" class="cv">Download CV</a>
</div>

Answered By – Dhruv

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More