Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make the position of pop-over absolute so that moves along with the page's elements
    primarykey
    data
    text
    <p>I'm working on WP and I have added a plugin called 'WordPress PopUp' in order to show an option form when someone lands on my website.</p> <p>I need to appear in a fixed position under a certain box. I have managed to achieve that. The problem is that the theme is responsive so the elements' position adjust based on the browser's window size.</p> <p>How I can make move along with the other elements?</p> <p>Here's how the HTML looks:</p> <pre><code>&lt;div id='&lt;?php echo $popover_messagebox; ?&gt;' class='visiblebox' style='position: fixed; &lt;?php echo $style; ?&gt;'&gt; &lt;a href='' id='closebox' title='Close this box'&gt;&lt;/a&gt; &lt;div id='message' style='&lt;?php echo $box; ?&gt;'&gt; &lt;?php echo do_shortcode($popover_content); ?&gt; &lt;div class='clear'&gt;&lt;/div&gt; &lt;?php if($popover_hideforever != 'yes') { ?&gt; &lt;div class='claimbutton hide'&gt;&lt;a href='#' id='clearforever'&gt;&lt;?php _e('Never see this message again.','popover'); ?&gt;&lt;/a&gt;&lt;/div&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;div class='clear'&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Here's the CSS:</p> <pre><code>div#messagebox { position: fixed; background: none; z-index: 999; padding: 10px; left: 945px; top: 152px; z-index: 999999; margin: 0px; visibility: visible; } div#messagebox div.claimbutton { position: absolute; bottom: -15px !important; right: 10px !important; width: 295px !important; background-color: white !important text-align: right; padding-top: 5px; padding-bottom: 5px; } div#messagebox div.claimbutton a:visited, div#messagebox div.claimbutton a { font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; color: #FFF; text-shadow: rgba(0, 0, 0, 0.5) 0 1px !important; font-weight: bold; padding-right: 5px; } #message p { position: relative; clear: both; } #messagebox #closebox { position: absolute; width: 30px; height: 29px; background: transparent url(%styleurl%images/closemessagebland.png) no-repeat; top: -5px; left: -5px; z-index: 5; } div#message { position: relative; background: #fff; font: 0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; min-height: 90%; overflow: hidden; border: 1px solid #ccc; } #messagebox. #closebox { top: 0 !important; left: 0 !important; } </code></pre> <p>Here's a link to my website</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload