0

I am trying to put "per month" vertical-align to the price "$29" just like the picture.You can help me fix my code or give me a new way that is better for me.

This is what I want.

enter image description here

This is what I had

enter image description here

here is my HTML code.

  <div class="deal">
          <span class="price">&dollar;29</span>
          <span class="period">per month</span>
        </div>

and my css.

.price {
  font-size: 50px;
}
.monthly {
  color: #d0d3d4;
  vertical-align: middle;
  display: inline-block;
}
Đức Seven
  • 57
  • 1
  • 5

2 Answers2

2

CSS

.deal{
  display:flex;
  align-items:center;
}
.period{
  margin-left:0.5rem;
}

jsfiddle

Todor Markov
  • 507
  • 5
  • 12
2
.deal {
display: inline-flex;
align-items: center;
}