• Resolved Sebas Dekker

    (@sebas-dekker)


    Dear Dev’s,

    Thanks a lot for this easy to use and customizable plugin!

    1 question for you guys tho ;).

    I would like to move the div#cookie-notice HTML-code above my div.site-container HTML-code so i can position the cookie-notice normally, instead of position:fixed;. In that way the cookie content will push the main content below itself.

    Right now if i remove the ‘position:fixed;’ attribute from the ‘cookie-notice <div>element’ the ‘cookie-notice <div>’ is pushed to the bottom of the page. I (my client) would like to have it on the top of page.

    Can you guys help me out?

    Thanks anyways, Greetz Seb

    https://ww.wp.xz.cn/plugins/cookie-notice/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author dFactory

    (@dfactory)

    Hi Seb,

    That’s a tricky one but you can achieve that using a bit of jQuery (no other way for now I think).

    You’d need to detach the cookie notice div (#cookie-notice) and append it to a desired selector or class (.site-container)

    Here’s some info with examples on how to do a similar thing: http://stackoverflow.com/questions/1279957/how-to-move-an-element-into-another-element

    Good luck,
    Bartosz / df

    ps. forgot to mention that you have to change the fixed position to relative or static, just like you did btw. other way it will stay on top (or bottom), no matter where the cookie notice div will reside in DOM.

    Thread Starter Sebas Dekker

    (@sebas-dekker)

    Thank you for responding this fast senor.

    Greetz

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Possible to move HTML code above div.site-container?’ is closed to new replies.