Search
Star
1.4k
Feedback
Setup for Free
KP-C
Kevin Powell - Community
•
9mo ago
•
2 replies
noob
Is it possible to make input element fit-content with css?
Hi guys
, I wonder if it is possible to make input element fit
-content with CSS
(I
'm using tailwind css
)
? I tried
, but it does not work
<div> <input className="w-fit"/> </div>
<div> <input className="w-fit"/> </div>
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,301
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
<
div
>
<
input
className
=
"w-fit"
/>
</
div
>
<
div
>
<
input
className
=
"w-fit"
/>
</
div
>
Similar Threads
How to make a td element fit content?
KP-C
Kevin Powell - Community / help
8mo ago
is it possible to make this layout with grid?
KP-C
Kevin Powell - Community / help
6mo ago