Solution 1 :

It’s not specified if element’s should be centered but switching from display: flex to display: inline-block will give you desired outcome (I guess)

Problem :

Here is my reduced text case on CodePen.

Here is the HTML:

<a href="#" class="btn third">Pull Card At Random</a> 
<a href="#" class="btn third">Choose card from album</a>

Here is the CSS:

.third {
  border-color: crimson;
  color: black;
  box-shadow: 0 0 40px 40px crimson inset, 0 0 0 0 crimson;
  transition: all 150ms ease-in-out;
  width: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn {
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: 2px solid #e74c3c;
  border-radius: 0.6em;
  color: #e74c3c;
  cursor: pointer;
  display: flex;
  align-self: center;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  padding: 2%;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  margin: 0 auto;
  margin-top: 50px;
  margin-bottom: 50px;
}

a:visited {
    color: white;
}
a:link {
    color: white;
}

Notice the two crimson boxes are stacked, one on top of the other. If I wanted to orient them horizontally so they are to the left and to the right of each other, what do I need to change in my CSS?

Resources I have already used:

Comments

Comment posted by TwistedOwl

I recommend using Chrome Dev Tools – by selecting css value of display property you can quickly change it using keyboard arrows – that way you can quickly check all possible options 🙂

By