Below is the code snippet that I am working with:
.special-price {
text-align: center;
background-color: #2e566e;
}
.special-price .offer {
border-radius: 50%;
background-color: #56c243;
color: #fff;
font-weight: 700;
font-size: 18px;
height: 150px;
width: 150px;
display: inline-block;
text-align: center;
border: 1px solid;
}
.offer .symbol {
vertical-align: top;
}
.offer .dollars {
font-size: 60px;
}
.offer .cents {
vertical-align: top;
}
<div class="row">
<div class="special-price col-xs-12 col-md-8 col-md-offset-2">
<div class="general-comparison clearfix">
<div class="offer">
<sup class="symbol">$</sup><span class="dollars">34</span><sup class="cents">.99</sup><span class="tax">+ TAX</span>
</div>
<!-- end .general-comparison -->
</div>
</div>
</div>
Query/Concern
- Why does the dollar sign extend beyond the circle?
- Even though I have applied
text-align:center
to the parent container, why is the child elementoffer
not centered within the parent elementspecial-price
?
I am open to any suggestions for improving the visual appearance of this, as I do not possess a keen eye for design.
For a demonstration, you can view the JSFiddle linked here.