![]() |
It is to be noted that Tailwind CSS doesn’t support negative padding values, or in other words, there is no concept that exists for utilizing the padding value as negative.
Instead of using this (negative padding), the negative margin can be used by specifying the dash as a prefix followed by the class name, in order to convert it to a negative value. In this article, we’ll see the usage of the margin negative in a tailwind CSS, in order to create the responsive design.
Syntax: It is the basic syntax of negative margin. <element class="-mt-* ..."></element> Here, the * denotes any integer value, mt denotes the margin-top. We can use b, l, and r, for bottom, left, & right respectively with margin property. Tailwind class for negative Margin:
Example: This example demonstrates including the negative margin classes to the element using Tailwind CSS. HTML
Output: ![]()
Reference: https://tailwindcss.com/docs/margin#using-negative-values |
Reffered: https://www.geeksforgeeks.org
CSS |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 10 |