I want to center the search bar inside the parent div but it's not working. I tried using flex and justify-center on the parent div but not only it doesn't center, it also shrinks my search bar's div. I think it's because it is not allowed to have the classes flex nested inside each other, so I tried text-center but that also didn't work.
Some links I looked into:
Code:
<div>
<div className="flex items-center max-w-md shadow rounded border-0 p-3">
<input type="search" className="flex-grow py-2" placeholder="Search by name..." />
<i className="fas fa-search flex-grow-0 py-2 px-2" />
</div>
</div>
<div>
. Your searchbar covers the whole width of it's direct parent. Question. Do you want to be centered horrizontally , right ? – Mihai T