-1
I have some results in the bank and need to align them according to the image below. But I could not. I am doing in Laravel 5.8.
<table style="border-collapse: collapse; width: 100%;" border="0">
<tbody>
@foreach ($equipe as $key => $a)
<tr>
<td style="width: 50%;">
<p style="text-align: center;"><strong>{{$a->admin->name}}</strong></p>
<p style="text-align: center;">Controladora Municipal</p>
</td>
<td style="width: 50%;">
<p style="text-align: center;"><strong>{{$a->admin->name}}</strong></p>
<p style="text-align: center;">Controladora Municipal</p>
</td>
</tr>
@endforeach
</tbody>
</table>
It’s as if every 2 foreach results I could fit into the table. How can I align the foreach result so?
It seems to be confusing front-end and back-end, if back-end data is coming as expected, alignment is style.
– MagicHat
i need to play this image result.. know how to do it? I tried using a break, etc...
– João Pedro Andrade
Break? I believe I have to edit the question and add the CSS tags, Flex-Grid, Flex-box... Put the result you have...
– MagicHat
wanted to know how I would do it in html so...
– João Pedro Andrade
So you actually need to analyze the structure. What you want sounds more like a list
<ul>
than with table... What exactly do you want is a table? Have other fields? Because there are 2 rows and 2 columns of the same type of data. Something doesn’t feel right)– MagicHat
Likely you have bootstrap in the project if you have take a look at grids. Already facilitating your life, you will probably have to use 6 columns, getting something like:
col-sm-6
in the classes.– Lucas Pace