These checkboxes are in foreach loop and need to show these boxes horizontally or in a group
<div class="col-12">
@foreach ($inactive_isos as $inactive_iso )
{{-- <div class="wall text-center"> --}}
<p> {{$inactive_iso->standard_name}}</p>
<label class="brick tile-picker">
<input type="checkbox">
<i class="tile-checked"></i>
</label>
{{-- </div> --}}
@endforeach
</div>
My Answer:
To align the checkboxes horizontally in a foreach loop in Laravel, you can use CSS to style the checkboxes and their labels. Here's an example of how you can modify your code to display the checkboxes horizontally:
html
@foreach ($inactive_isos as $inactive_iso )
{{ $inactive_iso->standard_name }}
@endforeach
And then add the following CSS to your stylesheet:
css
.checkbox-group {
display: inline-block;
margin-right: 10px;
}
.checkbox-label {
display: inline-block;
margin-right: 5px;
}
This will display the checkboxes and their labels inline, making them appear horizontally in a group. You can adjust the margin values in the CSS to suit your design preferences.
Rate this post
4 of 5 based on 4817 votesComments