Position fixed overlapping issue?

Mehar

How to prevent a div with position: fixed to stay in the outer div and prevent it from overlapping to the footer of the website.

For example, I have a div, and I want to scroll the div within the content div between the header and footer sections and not move from the div outside the content.

My code for this:

HTML

<div id="fixed_div"></div>

CSS

#fixed_div {
    background: none repeat scroll 0 0 #F1F1F1;
    padding: 10px;
    position: fixed;
    width: 290px;
    z-index: 99;
}
Vektor

There is a plugin for jQuery called Waypoints. It allows you to detect when an element has been scrolled to. http://imakewebthings.com/jquery-waypoints/

$('.footer').waypoint(function(direction) {
  $('#fixed_div').hide();
});

Its API is quite helpful and should be able to suit your needs.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

position: fixed overlapping page

From Dev

fixed position header overlapping

From Dev

position relative overlapping position fixed

From Dev

position fixed element is overlapping into footer

From Dev

DIV Position Fixed, inner content overlapping

From Dev

have an issue with position fixed.

From Dev

Smooth scroll issue with position:fixed;

From Dev

Header in fixed position is overlapping with container div when the window is reduced in width

From Dev

macgap scrolling issue when position fixed

From Dev

Position fixed and overflow-y:scroll issue

From Dev

Position:fixed issue in IO S safari

From Dev

macgap scrolling issue when position fixed

From Dev

position:fixed issue in Firefox 47 only

From Dev

Chrome issue with background-attachment fixed and position fixed elements

From Dev

Chrome issue with background-attachment fixed and position fixed elements

From Dev

Remove bounce on scroll in browser, issue with position:fixed div

From Dev

IE - position fixed z-index draw issue

From Dev

Chrome only: Overlay divs on scroll with fixed position scrolling issue

From Dev

CSS Fixed position menu - scrolling issue when resizing the browser

From Dev

CSS or Browser issue with a position: fixed while jquery script

From Dev

position:fixed navigation header overlapping browser scroll bar when using overflow-x

From Dev

Overlapping dynamic fixed header

From Dev

Fixed notifications overlapping

From Dev

Avoiding overlapping with fixed element

From Dev

Div overlapping and collision position

From Dev

Regex for overlapping fixed width matches

From Dev

Fixed image overlapping another div

From Dev

Bootstrap Fixed Navbar Overlapping Content

From Dev

A fixed size row with overlapping elements

Related Related

  1. 1

    position: fixed overlapping page

  2. 2

    fixed position header overlapping

  3. 3

    position relative overlapping position fixed

  4. 4

    position fixed element is overlapping into footer

  5. 5

    DIV Position Fixed, inner content overlapping

  6. 6

    have an issue with position fixed.

  7. 7

    Smooth scroll issue with position:fixed;

  8. 8

    Header in fixed position is overlapping with container div when the window is reduced in width

  9. 9

    macgap scrolling issue when position fixed

  10. 10

    Position fixed and overflow-y:scroll issue

  11. 11

    Position:fixed issue in IO S safari

  12. 12

    macgap scrolling issue when position fixed

  13. 13

    position:fixed issue in Firefox 47 only

  14. 14

    Chrome issue with background-attachment fixed and position fixed elements

  15. 15

    Chrome issue with background-attachment fixed and position fixed elements

  16. 16

    Remove bounce on scroll in browser, issue with position:fixed div

  17. 17

    IE - position fixed z-index draw issue

  18. 18

    Chrome only: Overlay divs on scroll with fixed position scrolling issue

  19. 19

    CSS Fixed position menu - scrolling issue when resizing the browser

  20. 20

    CSS or Browser issue with a position: fixed while jquery script

  21. 21

    position:fixed navigation header overlapping browser scroll bar when using overflow-x

  22. 22

    Overlapping dynamic fixed header

  23. 23

    Fixed notifications overlapping

  24. 24

    Avoiding overlapping with fixed element

  25. 25

    Div overlapping and collision position

  26. 26

    Regex for overlapping fixed width matches

  27. 27

    Fixed image overlapping another div

  28. 28

    Bootstrap Fixed Navbar Overlapping Content

  29. 29

    A fixed size row with overlapping elements

HotTag

Archive