@Glorit74
Posted
There are some other solutions. I used the old fashioned table:
<table class="w-full text-charcoalDark">
<tbody class="divide-y-2 divide-grey"> /* class makes the lines between rows */
<tr>
<td class="w-[50%] py-3 pl-8">Calories</td>
<td class="text-primary font-bold">277kcal</td>
</tr>
You could use flexbox, here I used your code with tailwind properties:
<section class="flex flex-col divide-y-2 divide-grey">
<p class="flex pl-8 py-3">
<span class="w-[50%]">Carbs</span>
<span class="text-primary font-bold">0g</span>
</p>
Marked as helpful