Answer the question
In order to leave comments, you need to log in
How to indent a container?
For example, a simple page consists of three blocks: header, main, footer. main contains container. I set the margin property for the container. Why does top padding appear between main and header and not between container and main?
https://jsfiddle.net/s0z5tv4t/
Answer the question
In order to leave comments, you need to log in
margin is the outer padding, instead you need to use padding-top for the main block
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question