K
K
keche2017-05-19 09:16:26
css
keche, 2017-05-19 09:16:26

Why is the block not lengthening because of the float?

There is a block in which the background is replicated.
There are two other blocks in this block with a background, and float:left is written to put them side by side;
And as soon as you register such a property, the background stops repeating and the main block, in which everything is placed, stops stretching in height.
If you remove property float:left; blocks go one after another, i.e. not as it should, but the background block is stretched in height and the background is replicated.
How to deal with such a disadvantage?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Negwereth, 2017-05-19
@Negwereth

overflow: hidden on the parent. Have you been banned on Google?
float parent collapses

R
Raphael™, 2017-05-19
@maxminimus

don't use float
use flexbox as the default for everything
see my article on flexbox first

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question