The background color black fills the padding area only As show below and I need it to cover the whole div area.
Asked
Active
Viewed 32 times
-2
-
Please provide all relevant code in an [mcve] in the question itself, not on a third-party site. – Heretic Monkey Dec 14 '16 at 21:38
2 Answers
1
Your issue is that when you float
an element using css float:left
or float:right
, the parent container will lose it's natural height that is defined by its children.
You should read this post about floats
and clears

Max Baldwin
- 3,404
- 3
- 26
- 40
1
Your problem is you floats here is my suggestion make it Flex:
.core {padding:50px;margin:0 auto;max-width:1000px; display: flex;}
https://jsfiddle.net/nwtttmqk/
You can also do inline....but flex is....more flexible (and modern)

Riskbreaker
- 4,621
- 1
- 23
- 31