Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
I find this impossible to achieve - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
7mo ago
•
26 replies
Arcsin Cospix
I find this impossible to achieve
I
'm trying to
horizontally align an arbitrary number of
<li>
<li>
elements
so they
're all the
same width as the widest one
, and so they
wrap to a new line when needed
.
I need to do this
without hardcoding any values
in the CSS
.
Here is my CodePen
:
https://codepen.io/cos4ni2s/pen/KwdBVyz?editors=1100
EDIT
The
<ul>
<ul>
container should be as wide as its content
. Something like
width: fit-content;
width: fit-content;
CodePen
Arcsin Cospix
CSS Frustration
.
.
.
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How do I achieve this? Is this a clip-path, a mask or what?
KP-C
Kevin Powell - Community / help
6mo ago
What am I supposed to study to achieve this? Yes, it's Javascript, but what exactly?
KP-C
Kevin Powell - Community / help
4mo ago
Is it possible to achieve this animation using html and css
KP-C
Kevin Powell - Community / help
5mo ago
Where to find stock images
KP-C
Kevin Powell - Community / help
10mo ago