Answer the question
In order to leave comments, you need to log in
Positioning an element relative to the screen, not the block?
Tell me, please, who knows what script you need to write so that when you open the block, it is positioned in the center relative to the display, and not relative to other blocks of the site.
On css position they do not give the desired result, because. if you make a position from the parent wrap, then at some point the form opens partially outside the visible window, which is why you need to scroll the page to the desired position to view the full form. It looks something like this - prntscr.com/npnh1w
And if you position relative to the direct parent, then the form is logically displayed only on the right side of the screen, and not in the center (because the parent is the right column of the site).
In JS, I myself am not boom-boom :) I can’t write it myself, but Google doesn’t give information.
Code structure:
<div wrap>
<div 1>Колонка 1</div 1>
<div 2>Колонка 2
<h2>заголовок<h2>
<div 2.1>Имя<div 2.1>
<div 2.2>текст<div 2.2>
<div 2.3>Кнопка "напиши мне"<div 2.3>
<div 2.4>Форма отправки e-mail<div 2.4>
</div 2>
</div wrap>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question