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 Overflow
🌐
Tailwind 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...
Discussions

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
🌐 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
🌐 github.com
4
1
Align Text in the exact center of a flexbox
You didnt tell the flexbox to align or justify its children More on reddit.com
🌐 r/tailwindcss
2
0
August 2, 2023
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
🌐 r/webdev
17
12
July 7, 2023
🌐
Tailwind CSS
tailwindcss.com › docs › align-content
align-content - Flexbox & Grid - Tailwind CSS
Use content-stretch to allow content items to fill the available space along the container’s cross axis:
🌐
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.
🌐
GeeksforGeeks
geeksforgeeks.org › css › how-to-move-flex-items-to-the-right-in-tailwind-css
How to move Flex Items to the Right in Tailwind CSS ? - GeeksforGeeks
July 23, 2025 - Apply the flex class to the container element to enable Flexbox. Assign the justify-end class to the flex container. This class aligns the flex items to the end of the main axis, pushing them to the right in a row direction.
🌐
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.
Find elsewhere
🌐
Tailwind CSS
v3.tailwindcss.com › docs › align-items
Align Items - Tailwind CSS
Use items-baseline to align items along the container’s cross axis such that all of their baselines align: 01 · 02 · 03 · <div class="flex items-baseline ..."> <div class="pt-2 pb-6">01</div> <div class="pt-8 pb-12">02</div> <div class="pt-12 ...
🌐
Tailwind CSS
tailwindcss.com › docs › justify-content
justify-content - Flexbox & Grid - Tailwind CSS
Use the justify-end or justify-end-safe utilities to justify items against the end of the container's main axis: Resize the container to see the alignment behavior
🌐
Tailwind CSS
tailwindcss.com › docs › align-self
align-self - Flexbox & Grid - Tailwind CSS
Utilities for controlling how an individual flex or grid item is positioned along its container's cross axis. Use the self-auto utility to align an item based on the value of the container's align-items property:
🌐
GeeksforGeeks
geeksforgeeks.org › css › how-to-align-two-elements-left-and-right-using-tailwind-css
How to Align Two Elements Left and Right Using Tailwind CSS? - GeeksforGeeks
July 23, 2025 - The flow-root utility in Tailwind CSS creates a block formatting context that clears floated elements. By applying flow-root to a parent container and using float-left and float-right on child elements, you can easily align elements to the left ...
🌐
Tailwind CSS
v1.tailwindcss.com › docs › align-items
Align Items - Tailwind CSS
Use items-start to align items to the start of the container's cross axis:
🌐
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.
🌐
Tailwind CSS
tailwindcss.com › docs › justify-items
justify-items - Flexbox & Grid - Tailwind CSS
Use the justify-items-end or justify-items-end-safe utilities to justify grid items against the end of their inline axis: Resize the container to see the alignment behavior
🌐
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
🌐
DEV Community
dev.to › fromshubhi › tailwind-css-tutorial-8-align-items-1p43
Tailwind CSS tutorial #8: Align Items - DEV Community
November 10, 2022 - <li class="w-full h-40 flex ... py-1 rounded text-white bg-pink-500 rounded-2">items-center</div> </div> </li> ... Use items-baseline to align items along the container’s cross axis such that all of their baselines ...