I just can figure out why the right button has not enough padding.
<div class="col-span-2 flex gap-0.5 items-center justify-between">
<p>Wie möchten Sie ihre Antwort erhalten?</p>
<div class="grid grid-cols-2 gap-1.5">
<div
class="whitespace-nowrap rounded bg-black px-4 py-3 text-center leading-none text-white"
>
E-Mail
</div>
<div
class="whitespace-nowrap rounded border px-4 py-3 text-center leading-none"
>
Telefon
</div>
</div>
</div>
2
Answers
the padding is OK, but the value of the
width
(47.8) is fixed and the same for the 2 on your 2 buttonsyou may do this:
You could consider applying
flex-basis: 0; flex-grow: 1
to the<p>
element. This means that the grid container for the buttons will be "prioritized" in its width. This allows its buttons to be their natural width. Any remaining parent horizontal space is then filled by the<p>
element: