react-beautiful-dnd-grid icon indicating copy to clipboard operation
react-beautiful-dnd-grid copied to clipboard

How can I make my div fill the entire width of the parent ?

Open Fantomiald opened this issue 6 years ago • 2 comments

Hi,

I'm trying to use react-beautiful-dnd-grid but i've a problem: my cards doesn't fill the space they should fill. I would like them to have a 33% width but their width fit with the content (there the id I send by props).

I tried to put some CSS properties on some divs, like the one containing the <ListManager/> or the one containing my card, but nothing to do, they don't have the width I want them to have.

This is the result I have:

Sélection_001

And this is the result I would have:

Sélection_002

In my WidgetsContainer component:

<div>
      <ListManager
        items={sortedList}
        direction="horizontal"
        maxItems={3}
        render={item => <Widget title={item.id}/>}
        onDragEnd={reorderList}
      />
    </div>

Then my WIdgetsComponent:

<div className={'mb-4 px-2 min-w-full'}>
      <div
        className={
          'bg-white shadow-lg overflow-hidden rounded w-full transition-2 grow-hover'
        }
      >
        <div className={`w-full bg-blue-800 h-24 ` + css(styles.banner)}><p>{title}</p></div>
        <div className={'w-full p-2 h-48 bg-white'}/>
      </div>
    </div>

I hope you will be able to help me ! Thanks :)

Fantomiald avatar Nov 11 '19 17:11 Fantomiald

😕 How do I want a card to occupy 2 columns?

jasp402 avatar Jan 02 '20 23:01 jasp402

I am also facing the same issue

HrithikMittal avatar Apr 15 '24 12:04 HrithikMittal