Tailwind CSS help needed with NavBar menu for mobile devices

Viewed 34

I need help with styling navbar menu for mobile devices. Currently I am able to either have all the buttons be on the left, but when i try to put them in the center of the screen they do align but its left-aligned in the center of the page whereas I want it to be center-aligned to the center.this is on the left without any style

when i add this code [div className="flex justify-center items-center"] it becomes like this image.which is like this in the center but still left-aligned text

how can i make it center-aligned text so that it looks a center flow and not so strict.

any help would be appreciated.

1 Answers

To make text center aligned use text-center in your div className. If this doesn't work, do this directly on the text, e.g: h2 className='text-center'.

Related