Skip to content

bug: Carousel height #4623

Closed
Closed

Description

@robsontenorio

Reproduction URL (Required)

https://play.tailwindcss.com/8B9MkVnoGk

What version of daisyUI are you using?

5.6.14

Which browsers are you seeing the problem on?

Firefox

Describe your issue

Safari / Chrome works fine

Image

Not in firefox

Image

Notice I don't want to set default height/width on images, because it should fit dynamically in the container.

Activity

  1. github-actions commented on Jul 10, 2026

    @github-actions

    Thank you @robsontenorio for reporting issues. It helps daisyUI a lot 💚
    I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
    In the meantime providing more details and reproduction links would be helpful.

  2. pdanpdan commented on Jul 10, 2026

    @pdanpdan
    Contributor

    Isn't this the exact duplicate of #4429

  3. robsontenorio commented on Jul 10, 2026

    @robsontenorio
    Author

    @pdanpdan I noticed this is "different now" because I was expecting that daisyUI should work the same with Firefox.

  4. saadeghi commented on Jul 10, 2026

    @saadeghi
    Owner

    Let's keep this issue, because #4429 was a discussion.
    I agree that it's better to set sizes to the images, but this shouldn't look different in different browsers either.

    I will work on it.

  5. self-assigned this
    on Jul 10, 2026
  6. pdanpdan commented on Jul 17, 2026

    @pdanpdan
    Contributor

    It looks like the .carousel-item needs a h-full so that firefox also applies the right width

    example: https://play.tailwindcss.com/XJQmpKMi6S

  7. robsontenorio commented on Jul 17, 2026

    @robsontenorio
    Author

    But it will break on WebKit

  8. pdanpdan commented on Jul 17, 2026

    @pdanpdan
    Contributor

    Yes, correct.
    Firefox + Safari: https://play.tailwindcss.com/quCg5Gw2Ns
    So you must specify height on both .carousel-item and on img

  9. robsontenorio commented on Jul 17, 2026

    @robsontenorio
    Author

    Do you mean I need to use different CSS approachs for different OS/Browsers?

  10. pdanpdan commented on Jul 17, 2026

    @pdanpdan
    Contributor

    No. Chrome works by default. Firefox needs the h-full on carousel-item. Safari needs h-full on img if you put it on carousel-item
    The last example should look the same on all browsers.
    But if you want to always show full-height and only images (no overlays or other elements in an item) then the simplest solution is to put images as direct children of carousel and apply carousel-item class on the images

  11. robsontenorio commented on Jul 17, 2026

    @robsontenorio
    Author

    Ok, I think this is enough , thanks and sorry for bothering !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions