.all-container { display : flex; justify-content: space-between; /* align-items: baseline; width : min-content; flex-direction: row; flex-wrap: wrap;*/ } .flex-container { /* We first create a flex layout context */ display : flex; align-items: baseline; width : min-content; /* Then we define the flow direction and if we allow the items to wrap * Remember this is the same as: * flex-direction: row; * flex-wrap: wrap; */ /* Then we define how is distributed the remaining space */ flex-direction: column; } /* .flex-item { padding: 5px; width: 200px; height: 150px; margin-top: 10px; line-height: 150px; color: white; font-weight: bold; font-size: 3em; text-align: center; }*/ .vitraux { /* We first create a flex layout context */ display : flex; align-items: baseline; width : min-content; /* Then we define the flow direction and if we allow the items to wrap * Remember this is the same as: * flex-direction: row; * flex-wrap: wrap; */ /* Then we define how is distributed the remaining space */ flex-direction: column; } .vitrail { margin: 3px; padding: 6px; background-image: url(ress/fond_fin.png); background-repeat: no-repeat; background-position: center; background-size: cover; } .vitrail-select { margin: 3px; padding: 6px; background-image: url(ress/fond_fin.png); background-repeat: no-repeat; background-position: center; background-size: cover; border: 5px solid red; } .vitrail-hover { margin: 3px; padding: 6px; background-image: url(ress/fond_fin.png); background-repeat: no-repeat; background-position: center; background-size: cover; border: 5px solid blue; }