Home > Net >  Tailwind overflow-x not working with full width
Tailwind overflow-x not working with full width

Time:01-13

I have list of divs in row. What I want is if screen full then it will simply scroll but its just reducing div size

Its showing like this

enter image description here

Its not scrolling in full screen

Code is little long so I created Tailwind play link : https://play.tailwindcss.com/IP00al3fVM

CodePudding user response:

If I understand your question correctly, you want it to display full on the screen. If that's what you want, add a 'w-full' class to your second line. It would then look like this:

<div >

CodePudding user response:

If you use Tailwind v3 and above, you can replace your first two lines of:

<div >
    <div >

with:

<div >
    <div >

https://play.tailwindcss.com/kZNxBqq0R9?layout=horizontal

If you're stuck with using Tailwind v2, you just need to add flex-shrink-0 to your child elements, replace w-96 with w-full and adjust the other overflow values as shown in the above code.

https://play.tailwindcss.com/ALCxmJsAPq

  • Related