I am working with react
and tailwind css
. I want to give 100px
height
and width
to my div
. If anyone have an idea how to do it in tailwind css
please help me. Thanks in advance.
CodePudding user response:
In your div
tag you need to add classes for height
and width
. In tailwind-css
we can give fix
height
and width
using []
(square brackets). Like,
<div className="h-[100px] w-[100-px]">Your Content</div>
CodePudding user response:
Use h-{number} or h-px to set an element to a fixed height. Use w-{number} or w-px to set an element to a fixed width.