diff --git a/dist/sticky-kit.js b/dist/sticky-kit.js index 9597bd0..a848e93 100644 --- a/dist/sticky-kit.js +++ b/dist/sticky-kit.js @@ -106,7 +106,8 @@ height: height, display: elm.css("display"), "vertical-align": elm.css("vertical-align"), - "float": el_float + "float": el_float, + "z-index": -1 }); } if (restore) { diff --git a/sticky-kit.coffee b/sticky-kit.coffee index 73c3b13..5a6a4a3 100644 --- a/sticky-kit.coffee +++ b/sticky-kit.coffee @@ -182,7 +182,7 @@ $.fn.stick_in_parent = (opts={}) -> fixed = true css = { position: "fixed" - top: offset + top: offset + "px" } css.width = if elm.css("box-sizing") == "border-box"