html - How do I make a CSS element scroll with the page if it is already absolutely positioned? -


i have implemented slide in/out form tab activate functionality. works want except tab stays in same position because absolutely positioned css. want position scroll page.

here css

#slidingform-slider { width: 500px; top: 100px; position: absolute; }  #slidingform-sidebar1 { position: absolute !important; top: 180px !important; left: 113px !important; box-shadow: 0 0 8px gray; z-index: 10000 !important; } 

and here html

<div id="slidingform-sidebar1" onclick="slidingform_close_panel()"> <button class="contact-slideout-toggle contact-slideout-btn btn btn-lg         btn-primary hidden-xs hidden-sm">request call back</button> </div> <div id="slidingform-header">    <--- form in here ---> </div> </div> 

i figured out. put wrapper round whole thing , gave following css:

.slider-wrap { position: fixed; right: 0; z-index: 10000; } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -