When i don't insert md-button everything works perfectly. But when I add md-button, span doesn't work properly. The number "5" goes down. How can I solve this problem?
HTML:
<button md-button class="special-orders">xüsusi təkliflər <span>5</span></button>
CSS:
.special-orders {
font-size: 15px;
color: white;
span {
font-size: 11px;
display:inline-block;
width: 15px;
height: 15px;
text-align: center;
color: #FF2868;
background-color: white;
border-radius: 50%;
vertical-align: middle;
padding: 0;
}
}
The material styling sets the line-height on the button to 36px which seems to be causing the problem with the span having a fixed height and width. Setting the line height on the span as well is easier than trying to line everything up.
.special-orders {
font-size: 15px;
color: white;
span {
line-height: 18px;
width: 18px;
display:inline-block;
text-align: center;
color: #FF2868;
background-color: white;
border-radius: 50%;
vertical-align: middle;
padding: 0;
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.