The fixed menu?

Hello!
The following problem occurs, fix the menu at the top (position:fixed) and then the elements that were below it are moved up under the menu, how do I do to go paradoce, but at the same time, the menu was fixed.The difference in the pictures
bfaa28793cff49a99a8cb844328af3db.png0e40a620824d424088e65f91d9f4626a.png
September 19th 19 at 00:12
4 answers
September 19th 19 at 00:14
Oh, familiar problem. The fact that under the menu (it would be more logical to call the header) must register padding-top.
Example.
424a9c769a9d445a8874a9640e9955d4.pngb0ec604c859b400f819821f0b8ad2ef0.png
please see the comments below - Moshe54 commented on September 19th 19 at 00:17
: background-size: 100% 100%; (which is two times 100%) background-repeat: no-repeat.

Something like that. - douglas_Wehner commented on September 19th 19 at 00:20
: and background-attachment: fixed attribute - douglas_Wehner commented on September 19th 19 at 00:23
: well, it's to body, of course (if you have for it is the background) - douglas_Wehner commented on September 19th 19 at 00:26
anyway the picture is not shifted down, if possible gobavica Skype autor4n - Moshe54 commented on September 19th 19 at 00:29
: tell your VC - douglas_Wehner commented on September 19th 19 at 00:32
: vk.com/smoklew - Moshe54 commented on September 19th 19 at 00:35
September 19th 19 at 00:16
When I add position: fixed, also add a padding-top equal to the height of the menu to body or main container.
please see below comments - Moshe54 commented on September 19th 19 at 00:19
if you want to shift and the background image, you will either need to displace it with background-position, or is padding-top write to position: relative, top: X, where X is the height of the menu. The first option is preferable. - douglas_Wehner commented on September 19th 19 at 00:22
September 19th 19 at 00:18
Added to the container padding-the top, the text is shifted and the image itself has no background.
810ea417208249f89ae4b513e60e724f.png
body {
background:url('/////') no-repeat left 50px;
} - Moshe54 commented on September 19th 19 at 00:21
September 19th 19 at 00:20
Set the container value of the margin-top equal to the height of the menu.

Find more questions by tags HTML