Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container display:flex overflow slider #1305

Open
2 tasks done
ToledoNicola opened this issue May 10, 2024 · 3 comments
Open
2 tasks done

container display:flex overflow slider #1305

ToledoNicola opened this issue May 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ToledoNicola
Copy link

ToledoNicola commented May 10, 2024

Checks

Version

v.4.1.4

Description

everytime i put the slider inside a div with display flex the slider overflow

Reproduction Link

https://new-academy-f48ae6.webflow.io/test-splide

https://new-academy-f48ae6.webflow.io/formaciones

Steps to Reproduce

Screenshot 2024-05-10 at 20 13 09 Screenshot 2024-05-10 at 20 13 17

Expected Behaviour

I want to insert the slider inside a div with display flex or column and it stays inside and fits width 100%

@ToledoNicola ToledoNicola added the bug Something isn't working label May 10, 2024
@ToledoNicola ToledoNicola changed the title container displey flexbox overflow slider container display:flex overflow slider May 10, 2024
@arneprescher
Copy link

same with display: grid;

Are there any news on that? I love Splide but this behaviour hits me quite often since I'm working with modular layouts in a css grid :D

@webkitvn
Copy link

webkitvn commented Nov 6, 2024

I also encounter the same issue when using grid or flex

@joligoms
Copy link

I solved this issue myself by:

  • Wrapping the splide in a flexbox div
  • Then setting the splide to grow inside this flexbox AND set any arbitrary width value on splide (very important)
<style>
    .container {
        display: flex;
    }

    .splide-flex {
        display: flex;
        flex: 1 1 0%;
    }

    .splide-flex__component {
        flex: 1 1 0%;
        width: 200px; /* arbitrary width, can be anything AFAIK */
    }
</style>

<div class="container">
    <div class="splide-flex">
        <Splide class="splide-flex__component">
            (...)
        </Splide>
    </div>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants