3

I have placed some items in a row using display:inline-block and applied a white background to the parent div. In desktop mode the white background is not visible as all items in a row.

But when I resize the window the ...inner elements... goes to the next line which is fine, but the extra white background is occurring which is the parent background color.

So my question is while I have given display:inline-block to the parent row, why it is taking 100% width....not the total width of the inner elements.

Fiddle Link

Note: I have created a fiddle link so that it will be easy to resize the result window. Try to resize the result window you will see the issue. I have also tried the Flexbox option but same issue is there too.

Bhuwan
  • 16,525
  • 5
  • 34
  • 57

0 Answers0