Reputation: 31
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.
Upvotes: 2
Views: 6164
Reputation: 1
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.
Upvotes: 0
Reputation: 211
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>
Upvotes: 5