.resp{ padding:10px; border-color: white; border-width: medium; display: flex; flex-wrap: wrap; flex-direction: column; text-wrap: pretty; width: fit-content; } .div_box{ display: flex; flex-wrap: wrap; flex-direction: column; /* contain: content; */ overflow-wrap: anywhere; }