Answer the question
In order to leave comments, you need to log in
Can't attach a block to a section?
Good afternoon, just started learning html, css. When completing the task, I can’t figure out how to attach the block to the right edge of the indent (which is brown) so that when the page is scaled, this block does not float away.
https://codepen.io/roman-zolotov/pen/ZEbrbvO
Answer the question
In order to leave comments, you need to log in
Your paragraph has margin:auto, i.e. not fixed, and the heading position has a hard fixation from the right edge of 25px, at different resolutions, the indent of the paragraph is different, therefore, if there is a mismatch, the difference is visible to the naked eye.
I recommend that both the paragraph and the heading in this particular example be given fixed indents:
p {
...
/* width: 90%; */
margin-right: 25px;
margin-left: 25px;
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question