Home>

There is a button that pops up when you click on an element, it is necessary that it always pops up in a place like in Figure 1

But if I choose another element a little slipper, then it floats in the same place as in Fig. 1

I tried to do through Position Fixed and Sticky nothing comes out how can I solve this problem?

Here is the code of this modal window

<
div class= "modal-layout-choice" >
         ≪
DIV CLASS= "OVERLAY" >
           ≪
DIV ID= "Modal-Layout-Choice-ID" >
             ≪
div class= "modal-close" >
&
Times; <
/div >
             ≪
Button class= "Modal-Layout-Button" >
Choose <
/Button >
             ≪
div class= "Modal-Layout-Choice-Content" >
               ≪
DIV Class= "Modal-Title-Layout" >
Select layout <
/div >
               ≪
DIV Class= "Modal-Subtitle-Layout" >
We picked up the most relevant current <
BR >
 Planning for better Broatka <
/div >

After this code is a list with layout elements.

Please specify your specific problem or provide more detailed information about what you need. In the current form it is difficult to understand what you are asking.

Дух сообщества♦2021-09-05 16:48:08
  • Answer # 1

    Div # Modal-Layout-Choice-ID For this element, set Position: relative

    Button must be Position: Absolute

    But this is if the button is outside the scrolled block

  • Answer # 2

    Div # Modal-Layout-Choice-ID For this element, set Position: relative

    Button must be Position: Absolute

    But this is if the button is outside the scrolled block

  • Answer # 3

    Change the buttons' nesting, I can not say exactly because I do not see your code. But in general, with proper nesting the button Position Fixed should help

    I'll try now, if I do not work up the question code

    Danil2021-09-05 16:48:08

    Added code to question

    Danil2021-09-05 16:48:08
  • Answer # 4

    Change the buttons' nesting, I can not say exactly because I do not see your code. But in general, with proper nesting the button Position Fixed should help

    I'll try now, if I do not work up the question code

    Danil2021-09-05 16:48:08

    Added code to question

    Danil2021-09-05 16:48:08