I’m getting the labels at the side of the inputs instead of below. What I’m attempting is:
O O O O
1 2 3 4
This is my code in scss and angular. There are no styles added from typescript, only the numbers.
<div class="low_buttons">
<div class="page_selector" id="page_selector">
<span class="ps_item" *ngFor="let page of page_selector_items">
<input *ngIf="page.number !== 1;else check_item" type="radio" id="{{page.number}}" name="page_number" class="page_number">
<label for="{{page.number}}">{{page.number}}</label>
<ng-template #check_item>
<input type="radio" id="{{page.number}}" name="page_number" class="page_number" checked>
</ng-template>
</span>
</div>
</div>
.low_buttons {
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.page_selector {
scrollbar-width: thin;
position: absolute;
overflow-x: scroll;
white-space: nowrap;
display: inline-block;
padding-bottom: 15px;
margin-left: 20px;
width: 150px;
height: 100px;
.ps_item {
margin-left: 10px;
}
}
As I have read, this could be the problem since an span element is created for every [input/label] item, but couldn’t figure it out.
2
Answers
Try this one.