0

In this page https://www.visitmontaione.com/it/cosa-fare/attivita-da-fare/ I can't align a div with width 50% in a container div. I want to place 2 divs per row.

I have this css

#elencoattivita-wrap{
   display: table;
   width: 100%;
}

.elencoattivita{
display: inline-table;
width:33%;
}


@media (max-width: 992px) {
    .elencoattivita{
    display: inline-table;
    width:50%;
    }
}

@media (max-width: 638px) {
    .elencoattivita{
    width:100%;
    }
}

It works with width 33%, placing 3 divs in a row, but not with 50% that place only one div instead of 2.

Could you help me? Thanks a lot.

Filippo
  • 23
  • 4
  • 1
    Don't use `display: table` - that's for **actual data-tables** or when you actually need HTML+CSS table semantics (as it requires you to use `display: table-row` on descendant elements, and so on); instead use `display: flex` or `display: grid`. – Dai Nov 24 '21 at 20:45

0 Answers0