K
K
Ketino2022-03-27 15:53:57
css
Ketino, 2022-03-27 15:53:57

What to use when positioning elements: margin or position relative?

Let's say there is a block that comes after the header menu. It is necessary to make sure that there is a heading in the center of the block, some text under it and then a button.

What property should be used so that the title, subtitle and button are placed exactly as they are on the layout - position:relative with top/left or margin (top + left) specified?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wonderingpeanut, 2022-03-27
@wonderingpeanut

FLEXBOX

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question