I have span that I need to center vertically inside button Here is code of button
<div *ngFor="let item of questions[arrayIndex].answers; index as i">
<button
mat-raised-button
class="answer-button"
(click)="nextQuestion(item.id, questions[arrayIndex].id)"
>
<!-- <span [matBadge]="getLetterByIndex(i)" matBadgeSize="large"></span> -->
<span class="dot" >{{ getLetterByIndex(i) }}</span>
{{ item.answerValue }}
</button>
</div>
Here is CSS stuff
.answer-button {
color: white;
margin-top: 34px;
background: $default-button;
border-radius: 4px;
text-align: center;;
width: 350px;
height: 50px;
border: none;
-webkit-box-shadow: 0px 0px 10px 8px rgba(245, 187, 145, 0.4);
-moz-box-shadow: 0px 0px 10px 8px rgba(245, 187, 145, 0.4);
box-shadow: 0px 0px 10px 8px rgba(245, 187, 145, 0.4);
}
and <span>
css
.dot {
height: 25px;
width: 25px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
float: left;
margin-left: 12px;
background: #fce6a6;
}
at buttons with small words all okay
But with large amount of words it's not centered
How I can fix this?