To align your item to the right, you need to justify your flex items to the end by using justify-end inside your flex container.
You can also align your nav-bar items to the right side by changing flex-row to flex-row-reverse. This way, you get both variations of the items' order.
Code:
<div class="flex md:flex md:flex-grow flex-row justify-end space-x-1">
<a href="" class="py-4 px-2 text-teal-500 border-b-4 border-teal-300 font-semibold">Home</a>
<a href="" class="py-4 px-2 text-gray-500 font-semibold hover:text-teal-300 transition duration-300">Services</a>
<a href="" class="py-4 px-2 text-gray-500 font-semibold hover:text-teal-300 transition duration-300">About</a>
<a href="" class="py-4 px-2 text-gray-500 font-semibold hover:text-teal-300 transition duration-300">Contact Us</a>
</div>
<!-- or -->
<div class="flex md:flex md:flex-grow flex-row-reverse space-x-1">
<a href="" class="py-4 px-2 text-teal-500 border-b-4 border-teal-300 font-semibold">Home</a>
<a href="" class="py-4 px-2 text-gray-500 font-semibold hover:text-teal-300 transition duration-300">Services</a>
<a href="" class="py-4 px-2 text-gray-500 font-semibold hover:text-teal-300 transition duration-300">About</a>
<a href="" class="py-4 px-2 text-gray-500 font-semibold hover:text-teal-300 transition duration-300">Contact Us</a>
</div>
Tailwind-play: justify-end, flex-row-reverse.
Answer from ChenBr on Stack OverflowTailwind CSS
tailwindcss.com › docs › align-items
align-items - Flexbox & Grid - Tailwind CSS
Utilities for controlling how flex and grid items are positioned along a container's cross axis.
Tailwind CSS
tailwindcss.com › docs › text-align
text-align - Typography - Tailwind CSS
Use the text-left utility to left align the text of an element: So I started to walk into the water. I won't lie to you boys, I was terrified. But I pressed on, and as I made my way past the breakers a strange calm came over me. I don't know if it was divine intervention or the kinship of all living things but I tell you Jerry at that moment, I was a marine biologist. <p class="text-left">So I started to walk into the water...</p> Use the text-right utility to right align the text of an element...
alignment - How to align the navbar items to right corner in tailwind - Stack Overflow
To align your item to the right, you need to justify your flex items to the end by using justify-end inside your flex container. More on stackoverflow.com
How to position item in center and right with flex?
Hi, this may seem like a silly question but I am kind of stuck. I have two elements. And I want to position the first element in the center and the second element on the right just like this: Right... More on github.com
Align Text in the exact center of a flexbox
You didnt tell the flexbox to align or justify its children More on reddit.com
items-center not centering when using tailwind
The height of your body will fit to the height of your div. You should make your body ‘min-h-screen’ in order for it to work More on reddit.com
Videos
02:00
11 Tailwind CSS Text Alignment | Left, Center, Right - YouTube
04:35
↕️ Align Items | Tailwind CSS for Beginners - YouTube
06:42
↔️ Justify Content | Tailwind CSS for Beginners - YouTube
03:31
Tailwind css flexbox align items - Seri 22 - Flexbox 5 - YouTube
How to center a div in tailwind css?
06:41
Tailwind CSS Tutorial #7 - Using Flexbox - YouTube
Kombai
kombai.com › home › blog › tailwind › tailwind css align items
Tailwind CSS Align Items - Kombai Blog
2 days ago - Learn how to use Tailwind CSS align-items utilities to efficiently align flexbox or grid children, create precise layouts, and streamline responsive design.
Tailwind
windframe.dev › home › tailwind classes › tailwind align items
Tailwind CSS Align Items
January 15, 2026 - Default behavior — stretches flex items to fill the height of the container if no height is set. ... Making column grids look consistent. Stretching cards evenly even with different content lengths. Tailwind CSS allows you to apply align items classes responsively at different breakpoints.
Elmish
elmish.land › blog › mastering-flexbox-alignment-with-tailwindcss
Mastering Flexbox Alignment with Tailwind CSS | Elmish Land
February 21, 2025 - A great place to try and explore the tailwind utility classes is the Tailwind Play site. Before diving into alignment classes, it’s essential to understand how Flexbox operates: Main Axis → The direction items flow (flex-row = left to right, flex-col = top to bottom).
Kombai
kombai.com › home › blog › tailwind › tailwind css text align
Tailwind CSS Text Align - Kombai Blog
2 days ago - Responsive modifiers in Tailwind allow you to specify text alignment for different screen sizes effortlessly. You can combine utilities like sm:text-left, md:text-center, and lg:text-right to control alignment across breakpoints.
TutorialsPoint
tutorialspoint.com › tailwind_css › tailwind_css_align_items.htm
Tailwind CSS - Align Items
Tailwind CSS Align Items is a utility class used to position flex and grid items along the container's cross-axis. The following is the list of Tailwind CSS Align Items classes that help in the effective alignment of flex and grid items along the