Replies: 1 comment
-
Hi Bogdan!I see exactly what's happening. Because DaisyUI uses a Grid/Flex layout for the collapse-arrow, that chevron icon actually occupies "physical" space in the row. This pushes your title text to the left, making your text-center look off-balance. inshort: To get a perfect center, you need to "lift" the arrow out of the layout flow so the text can ignore it.The FixYou can wrap this logic in a single CSS block so it handles your dynamic backend text perfectly without needing manual padding. Add this to your CSS:Then update your HTML like this:Why this is better for your POV:
Hope this clears up that alignment for you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to align a text in collapse in the center, but chevron arrow takes some space and title is set a little to the right from the center. Is it possible to make arrow have a absolute position and text to be exactly in the center?
https://play.tailwindcss.com/L2yalFmJcY
I tried
pl-X, but it only works if the title is not dynamic (like comming from backend data).Beta Was this translation helpful? Give feedback.
All reactions