Tailwind Top Right Bottom Left
In this article, we will explore how to use Tailwind Top Right Bottom Left classes to position elements on your website.
A fixed or absolute positioning property is commonly used with these properties.
When you set an element’s position property to absolute or fixed, you can use the top, bottom, left, and right properties to position the element relative to its nearest positioned ancestor.
Tailwind Top Right Bottom Left Classes
Tailwind Top Right Bottom and Left classes make it easy to position HTML elements on your web page using these CSS properties.
These classes are named using a combination of the property name and a directional value, such as top-0 or right-4.
Below are detailed descriptions of all Tailwind top, right, bottom and left classes:
Classes | Overview |
inset-0 | Used to set the top, bottom, left and right properties to 0. |
inset-x-0 | Using this class, the left and right properties to 0. |
inset-y-0 | This class is used to set the top and bottom properties to 0. |
top-0 | The top property is specified as 0. |
right-0 | In this case, the right property is set to 0. |
bottom-0 | The bottom property is defined as 0. |
left-0 | The left property is specified as 0. |
inset-px | Used to set the top ,bottom, left and right properties to 1px. |
inset-x-px | Using this class, the left and right properties to 1px. |
inset-y-px | This class is used to set the top and bottom properties to 1px. |
top-px | The top property is specified as 1px. |
right-px | In this case, the right property is set to 1px. |
bottom-px | The bottom property is defined as 1px. |
left-px | The left property is specified as 1px. |
inset-0.5 | Used to set the top, bottom, left and right properties to 0.125rem or 2px. |
inset-x-0.5 | Using this class, the left and right properties to 0.125rem or 2px. |
inset-y-0.5 | This class is used to set the top and bottom properties to 0.125rem or 2px. |
top-0.5 | The top property is specified as 0.125rem or 2px. |
right-0.5 | In this case, the right property is set to 0.125rem or 2px. |
bottom-0.5 | The bottom property is defined as 0.125rem or 2px. |
left-0.5 | The left property is specified as 0.125rem or 2px. |
inset-1 | Used to set the top, bottom, left and right properties to 0.25rem or 4px. |
inset-x-1 | Using this class, the left and right properties to 0.25rem or 4px. |
inset-y-1 | This class is used to set the top and bottom properties to 0.25rem or 4px. |
top-1 | The top property is specified as 0.25rem or 4px. |
right-1 | In this case, the right property is set to 0.25rem or 4px. |
bottom-1 | The bottom property is defined as 0.25rem or 4px. |
left-1 | The left property is specified as 0.25rem or 4px. |
inset-1.5 | Used to set the top, bottom, left and right properties to 0.375rem or 6px. |
inset-x-1.5 | Using this class, the left and right properties to 0.375rem or 6px. |
inset-y-1.5 | This class is used to set the top and bottom properties to 0.375rem or 6px. |
top-1.5 | The top property is specified as 0.375rem or 6px. |
right-1.5 | In this case, the right property is set to 0.375rem or 6px. |
bottom-1.5 | The bottom property is defined as 0.375rem or 6px. |
left-1.5 | The left property is specified as 0.375rem or 6px. |
inset-2 | Used to set the top, bottom, left and right properties to 0.5rem or 8px. |
inset-x-2 | Using this class, the left and right properties to 0.5rem or 8px. |
inset-y-2 | This class is used to set the top and bottom properties to 0.5rem or 8px. |
top-2 | The top property is specified as 0.5rem or 8px. |
right-2 | In this case, the right property is set to 0.5rem or 8px. |
bottom-2 | The bottom property is defined as 0.5rem or 8px. |
left-2 | The left property is specified as 0.5rem or 8px. |
inset-2.5 | Used to set the top, bottom, left and right properties to 0.625rem or 10px. |
inset-x-2.5 | Using this class, the left and right properties to 0.625rem or 10px. |
inset-y-2.5 | This class is used to set the top and bottom properties to 0.625rem or 10px. |
top-2.5 | The top property is specified as 0.625rem or 10px. |
right-2.5 | In this case, the right property is set to 0.625rem or 10px. |
bottom-2.5 | The bottom property is defined as 0.625rem or 10px. |
left-2.5 | The left property is specified as 0.625rem or 10px. |
inset-3 | Used to set the top, bottom, left and right properties to 0.75rem or 12px. |
inset-x-3 | Using this class, the left and right properties to 0.75rem or 12px. |
inset-y-3 | This class is used to set the top and bottom properties to 0.75rem or 12px. |
top-3 | The top property is specified as 0.75rem or 12px. |
right-3 | In this case, the right property is set to 0.75rem or 12px. |
bottom-3 | The bottom property is defined as 0.75rem or 12px. |
left-3 | The left property is specified as 0.75rem or 12px. |
inset-3.5 | Used to set the top, bottom, left and right properties to 0.875rem or 14px. |
inset-x-3.5 | Using this class, the left and right properties to 0.875rem or 14px. |
inset-y-3.5 | This class is used to set the top and bottom properties to 0.875rem or 14px. |
top-3.5 | The top property is specified as 0.875rem or 14px. |
right-3.5 | In this case, the right property is set to 0.875rem or 14px. |
bottom-3.5 | The bottom property is defined as 0.875rem or 14px. |
left-3.5 | The left property is specified as 0.875rem or 14px. |
inset-4 | Used to set the top, bottom, left and right properties to 1rem or 16px. |
inset-x-4 | Using this class, the left and right properties to 1rem or 16px. |
inset-y-4 | This class is used to set the top and bottom properties to 1rem or 16px. |
top-4 | The top property is specified as 1rem or 16px. |
right-4 | In this case, the right property is set to 1rem or 16px. |
bottom-4 | The bottom property is defined as 1rem or 16px. |
left-4 | The left property is specified as 1rem or 16px. |
inset-5 | Used to set the top, bottom, left and right properties to 1.25rem or 20px. |
inset-x-5 | Using this class, the left and right properties to 1.25rem or 20px. |
inset-y-5 | This class is used to set the top and bottom properties to 1.25rem or 20px. |
top-5 | The top property is specified as 1.25rem or 20px. |
right-5 | In this case, the right property is set to 1.25rem or 20px. |
bottom-5 | The bottom property is defined as 1.25rem or 20px. |
left-5 | The left property is specified as 1.25rem or 20px. |
inset-6 | Used to set the top, bottom, left and right properties to 1.5rem or 24px. |
inset-x-6 | Using this class, the left and right properties to 1.5rem or 24px. |
inset-y-6 | This class is used to set the top and bottom properties to 1.5rem or 24px. |
top-6 | The top property is specified as 1.5rem or 24px. |
right-6 | In this case, the right property is set to 1.5rem or 24px. |
bottom-6 | The bottom property is defined as 1.5rem or 24px. |
left-6 | The left property is specified as 1.5rem or 24px. |
inset-7 | Used to set the top, bottom, left and right properties to 1.75rem or 28px. |
inset-x-7 | Using this class, the left and right properties to 1.75rem or 28px. |
inset-y-7 | This class is used to set the top and bottom properties to 1.75rem or 28px. |
top-7 | The top property is specified as 1.75rem or 28px. |
right-7 | In this case, the right property is set to 1.75rem or 28px. |
bottom-7 | The bottom property is defined as 1.75rem or 28px. |
left-7 | The left property is specified as 1.75rem or 28px. |
inset-8 | Used to set the top, bottom, left and right properties to 2rem or 32px. |
inset-x-8 | Using this class, the left and right properties to 2rem or 32px. |
inset-y-8 | This class is used to set the top and bottom properties to 2rem or 32px. |
top-8 | The top property is specified as 2rem or 32px. |
right-8 | In this case, the right property is set to 2rem or 32px. |
bottom-8 | The bottom property is defined as 2rem or 32px. |
left-8 | The left property is specified as 2rem or 32px. |
inset-9 | Used to set the top, bottom, left and right properties to 2.25rem or 36px. |
inset-x-9 | Using this class, the left and right properties to 2.25rem or 36px. |
inset-y-9 | This class is used to set the top and bottom properties to 2.25rem or 36px. |
top-9 | The top property is specified as 2.25rem or 36px. |
right-9 | In this case, the right property is set to 2.25rem or 36px. |
bottom-9 | The bottom property is defined as 2.25rem or 36px. |
left-9 | The left property is specified as 2.25rem or 36px. |
inset-10 | Used to set the top, bottom, left and right properties to 2.5rem or 40px. |
inset-x-10 | Using this class, the left and right properties to 2.5rem or 40px. |
inset-y-10 | This class is used to set the top and bottom properties to 2.5rem or 40px. |
top-10 | The top property is specified as 2.5rem or 40px. |
right-10 | In this case, the right property is set to 2.5rem or 40px. |
bottom-10 | The bottom property is defined as 2.5rem or 40px. |
left-10 | The left property is specified as 2.5rem or 40px. |
inset-11 | Used to set the top, bottom, left and right properties to 2.75rem or 44px. |
inset-x-11 | Using this class, the left and right properties to 2.75rem or 44px. |
inset-y-11 | This class is used to set the top and bottom properties to 2.75rem or 44px. |
top-11 | The top property is specified as 2.75rem or 44px. |
right-11 | In this case, the right property is set to 2.75rem or 44px. |
bottom-11 | The bottom property is defined as 2.75rem or 44px. |
left-11 | The left property is specified as 2.75rem or 44px. |
inset-12 | Used to set the top, bottom, left and right properties to 3rem or 48px. |
inset-x-12 | Using this class, the left and right properties to 3rem or 48px. |
inset-y-12 | This class is used to set the top and bottom properties to 3rem or 48px. |
top-12 | The top property is specified as 3rem or 48px. |
right-12 | In this case, the right property is set to 3rem or 48px. |
bottom-12 | The bottom property is defined as 3rem or 48px. |
left-12 | The left property is specified as 3rem or 48px. |
inset-14 | Used to set the top, bottom, left and right properties to 3.5rem or 56px. |
inset-x-14 | Using this class, the left and right properties to 3.5rem or 56px. |
inset-y-14 | This class is used to set the top and bottom properties to 3.5rem or 56px. |
top-14 | The top property is specified as 3.5rem or 56px. |
right-14 | In this case, the right property is set to 3.5rem or 56px. |
bottom-14 | The bottom property is defined as 3.5rem or 56px. |
left-14 | The left property is specified as 3.5rem or 56px. |
inset-16 | Used to set the top, bottom, left and right properties to 4rem or 64px. |
inset-x-16 | Using this class, the left and right properties to 4rem or 64px. |
inset-y-16 | This class is used to set the top and bottom properties to 4rem or 64px. |
top-16 | The top property is specified as 4rem or 64px. |
right-16 | In this case, the right property is set to 4rem or 64px. |
bottom-16 | The bottom property is defined as 4rem or 64px. |
left-16 | The left property is specified as 4rem or 64px. |
inset-20 | Used to set the top, bottom, left and right properties to 5rem or 80px. |
inset-x-20 | Using this class, the left and right properties to 5rem or 80px. |
inset-y-20 | This class is used to set the top and bottom properties to 5rem or 80px. |
top-20 | The top property is specified as 5rem or 80px. |
right-20 | In this case, the right property is set to 5rem or 80px. |
bottom-20 | The bottom property is defined as 5rem or 80px. |
left-20 | The left property is specified as 5rem or 80px. |
inset-24 | Used to set the top, bottom, left and right properties to 6rem or 96px. |
inset-x-24 | Using this class, the left and right properties to 6rem or 96px. |
inset-y-24 | This class is used to set the top and bottom properties to 6rem or 96px. |
top-24 | The top property is specified as 6rem or 96px. |
right-24 | In this case, the right property is set to 6rem or 96px. |
bottom-24 | The bottom property is defined as 6rem or 96px. |
left-24 | The left property is specified as 6rem or 96px. |
inset-28 | Used to set the top, bottom, left and right properties to 7rem or 112px. |
inset-x-28 | Using this class, the left and right properties to 7rem or 112px. |
inset-y-28 | This class is used to set the top and bottom properties to 7rem or 112px. |
top-28 | The top property is specified as 7rem or 112px. |
right-28 | In this case, the right property is set to 7rem or 112px. |
bottom-28 | The bottom property is defined as 7rem or 112px. |
left-28 | The left property is specified as 7rem or 112px. |
inset-32 | Used to set the top, bottom, left and right properties to 8rem or 128px. |
inset-x-32 | Using this class, the left and right properties to 8rem or 128px. |
inset-y-32 | This class is used to set the top and bottom properties to 8rem or 128px. |
top-32 | The top property is specified as 8rem or 128px. |
right-32 | In this case, the right property is set to 8rem or 128px. |
bottom-32 | The bottom property is defined as 8rem or 128px. |
left-32 | The left property is specified as 8rem or 128px. |
inset-36 | Used to set the top, bottom, left and right properties to 9rem or 144px. |
inset-x-36 | Using this class, the left and right properties to 9rem or 144px. |
inset-y-36 | This class is used to set the top and bottom properties to 9rem or 144px. |
top-36 | The top property is specified as 9rem or 144px. |
right-36 | In this case, the right property is set to 9rem or 144px. |
bottom-36 | The bottom property is defined as 9rem or 144px. |
left-36 | The left property is specified as 9rem or 144px. |
inset-40 | Used to set the top, bottom, left and right properties to 10rem or 160px. |
inset-x-40 | Using this class, the left and right properties to 10rem or 160px. |
inset-y-40 | This class is used to set the top and bottom properties to 10rem or 160px. |
top-40 | The top property is specified as 10rem or 160px. |
right-40 | In this case, the right property is set to 10rem or 160px. |
bottom-40 | The bottom property is defined as 10rem or 160px. |
left-40 | The left property is specified as 10rem or 160px. |
inset-44 | Used to set the top, bottom, left and right properties to 11rem or 176px. |
inset-x-44 | Using this class, the left and right properties to 11rem or 176px. |
inset-y-44 | This class is used to set the top and bottom properties to 11rem or 176px. |
top-44 | The top property is specified as 11rem or 176px. |
right-44 | In this case, the right property is set to 11rem or 176px. |
bottom-44 | The bottom property is defined as 11rem or 176px. |
left-44 | The left property is specified as 11rem or 176px. |
inset-48 | Used to set the top, bottom, left and right properties to 12rem or 192px. |
inset-x-48 | Using this class, the left and right properties to 12rem or 192px. |
inset-y-48 | This class is used to set the top and bottom properties to 12rem or 192px. |
top-48 | The top property is specified as 12rem or 192px. |
right-48 | In this case, the right property is set to 12rem or 192px. |
bottom-48 | The bottom property is defined as 12rem or 192px. |
left-48 | The left property is specified as 12rem or 192px. |
inset-52 | Used to set the top, bottom, left and right properties to 13rem or 208px. |
inset-x-52 | Using this class, the left and right properties to 13rem or 208px. |
inset-y-52 | This class is used to set the top and bottom properties to 13rem or 208px. |
top-52 | The top property is specified as 13rem or 208px. |
right-52 | In this case, the right property is set to 13rem or 208px. |
bottom-52 | The bottom property is defined as 13rem or 208px. |
left-52 | The left property is specified as 13rem or 208px. |
inset-56 | Used to set the top, bottom, left and right properties to 14rem or 224px. |
inset-x-56 | Using this class, the left and right properties to 14rem or 224px. |
inset-y-56 | This class is used to set the top and bottom properties to 14rem or 224px. |
top-56 | The top property is specified as 14rem or 224px. |
right-56 | In this case, the right property is set to 14rem or 224px. |
bottom-56 | The bottom property is defined as 14rem or 224px. |
left-56 | The left property is specified as 14rem or 224px. |
inset-60 | Used to set the top, bottom, left and right properties to 15rem or 240px. |
inset-x-60 | Using this class, the left and right properties to 15rem or 240px. |
inset-y-60 | This class is used to set the top and bottom properties to 15rem or 240px. |
top-60 | The top property is specified as 15rem or 240px. |
right-60 | In this case, the right property is set to 15rem or 240px. |
bottom-60 | The bottom property is defined as 15rem or 240px. |
left-60 | The left property is specified as 15rem or 240px. |
inset-64 | Used to set the top, bottom, left and right properties to 16rem or 256px. |
inset-x-64 | Using this class, the left and right properties to 16rem or 256px. |
inset-y-64 | This class is used to set the top and bottom properties to 16rem or 256px. |
top-64 | The top property is specified as 16rem or 256px. |
right-64 | In this case, the right property is set to 16rem or 256px. |
bottom-64 | The bottom property is defined as 16rem or 256px. |
left-64 | The left property is specified as 16rem or 256px. |
inset-72 | Used to set the top, bottom, left and right properties to 18rem or 288px. |
inset-x-72 | Using this class, the left and right properties to 18rem or 288px. |
inset-y-72 | This class is used to set the top and bottom properties to 18rem or 288px. |
top-72 | The top property is specified as 18rem or 288px. |
right-72 | In this case, the right property is set to 18rem or 288px. |
bottom-72 | The bottom property is defined as 18rem or 288px. |
left-72 | The left property is specified as 18rem or 288px. |
inset-80 | Used to set the top, bottom, left and right properties to 20rem or 320px. |
inset-x-80 | Using this class, the left and right properties to 20rem or 320px. |
inset-y-80 | This class is used to set the top and bottom properties to 20rem or 320px. |
top-80 | The top property is specified as 20rem or 320px. |
right-80 | In this case, the right property is set to 20rem or 320px. |
bottom-80 | The bottom property is defined as 20rem or 320px. |
left-80 | The left property is specified as 20rem or 320px. |
inset-96 | Used to set the top, bottom, left and right properties to 24rem or 384px. |
inset-x-96 | Using this class, the left and right properties to 24rem or 384px. |
inset-y-96 | This class is used to set the top and bottom properties to 24rem or 384px. |
top-96 | The top property is specified as 24rem or 384px. |
right-96 | In this case, the right property is set to 24rem or 384px. |
bottom-96 | The bottom property is defined as 24rem or 384px. |
left-96 | The left property is specified as 24rem or 384px. |
inset-auto | Used to set the top, bottom, left and right properties to auto. |
inset-1/2 | In this case, the top, bottom, left and right properties are set to 50%. |
inset-1/3 | The top, bottom, left and right properties are defined as 33.3%. |
inset-2/3 | Used to set the top, bottom, left and right properties to 66.67%. |
inset-1/4 | This class is used to set the top, bottom, left and right properties to 25%. |
inset-2/4 | In this case, the top, bottom, left and right properties are set to 50%. |
inset-3/4 | The top, bottom, left and right properties are defined as 75%. |
inset-full | Used to set the top, bottom, left and right properties to 100%. |
inset-x-1/2 | In this case, the left and right properties are set to 50%. |
inset-x-1/3 | The left and right properties are specified as 33.3%. |
inset-x-2/3 | Used to set the left and right properties to 66.67%. |
inset-x-1/4 | In this case, the left and right properties are set to 25%. |
inset-x-2/4 | The left and right properties are specified as 50%. |
inset-x-3/4 | This class is used to set the left and right properties to 75%. |
inset-x-full | In this case, the left and right properties are set to 100%. |
inset-y-1/2 | The top and bottom properties are specified as 50%. |
inset-y-1/3 | Used to set the top and bottom properties as 33.3%. |
inset-y-2/3 | This class is used to set the top and bottom properties to 66.67%. |
inset-y-1/4 | The top and bottom properties are specified as 25%. |
inset-y-2/4 | This class is used to set the top and bottom properties to 50%. |
inset-y-3/4 | Used to set the top and bottom properties as 75%. |
inset-y-full | In this case, the top and bottom properties are set to 100%. |
top-auto | This class is used to set the top property to default value of auto. |
top-1/2 | In this case, the top property is set to 50%. |
top-1/3 | Used to set the top property as 33.3%. |
top-2/3 | The top property is set to 66.67%. |
top-1/4 | By using this class, the top property is defined as 25%. |
top-2/4 | In this case, the top property is set to 50%. |
top-3/4 | Used to set the top property as 75%. |
top-full | The top property is set to 100%. |
right-auto | This class is used to set the right property to default value of auto. |
right-1/2 | By using this class, the right property is defined as 50%. |
right-1/3 | The right property is set to 33.3%. |
right-2/3 | In this case, the right property is specified as 66.67%. |
right-1/4 | By using this class, the right property is defined as 25%. |
right-2/4 | The right property is set to 50%. |
right-3/4 | Using this class, the right property is set to 75%. |
right-full | In this case, the right property is specified as 100%. |
bottom-auto | This class is used to set the bottom property to default value of auto. |
bottom-1/2 | Using this class, the bottom property is defined as 50%. |
bottom-1/3 | The bottom property is set to 33.3%. |
bottom-2/3 | In this case, the bottom property is specified as 66.67%. |
bottom-1/4 | This class is used to set the bottom property to 25%. |
bottom-2/4 | Using this class, the bottom property is defined as 50%. |
bottom-3/4 | The bottom property is set to 75%. |
bottom-full | In this case, the bottom property is specified as 100%. |
left-auto | This class is used to set the left property to default value of auto. |
left-1/2 | The left property is set to 50%. |
left-1/3 | Using this class, the left property is defined as 33.3%. |
left-2/3 | This class is used to set the left property to 66.67%. |
left-1/4 | The left property is set to 25%. |
left-2/4 | This class is used to set the left property to 50%. |
left-3/4 | Using this class, the left property is defined as 75%. |
left-full | In this case, the left property is specified as 100%. |
Syntax
<element class="inset-4">...</element>
Here are some examples of how to use Tailwind Top Right Bottom and Left classes to position HTML elements on your web page:
Below example makes use of some of the classes discussed above: