V
V
VinC2282020-11-17 14:21:06
css
VinC228, 2020-11-17 14:21:06

The picture is attached to the backround, how to solve?

Hello, such a problem, I'm trying to set a margin-top for the image and when I set it, the background moves along with the image. How to decide?
HTML:
5fb3b1da66f8c898318710.png
SASS:
5fb3b1f6c39be456769367.png
This is what it looks like on the site:
5fb3b21b8de74218128533.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2020-11-17
@sslion

Dig towards background-position and background-position fixed

S
Sagrana, 2020-11-17
@sagrana

You were right in the comments. Replace margin-top with padding-top so that the background stops moving out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question