jquery - How can I make a sticky menu, but not for the navbar at top, it's for something above footer? -


i try make logo above footer , when scroll down 0, see footer below logo. when scroll want see logo fixed on top of , footer hidden.

who can tell me how that?

i think code below you're trying accomplish.

html:

<header> </header>    <div id="container">      <img src="http://www-archive.mozilla.org/foundation/identity-guidelines/firefox-128.png" height=150px width=150px />  </div>   <div id="footer"> </div> 

css:

header { width: 100%; background-color: #686868; height:150px; }  #container { width: 60%; height:500px; background-color: #ffffff; margin-left:200px; padding: 0 2em 2em 2em; position: relative; margin-bottom:100px; z-index:10; }  #container img { margin-top:0px; position:fixed; }   #footer { width: 100%; background-color: #000000; padding: 0 2em 2em 2em; position: relative; height:30px; } 

jfiddle demo here: http://jsfiddle.net/lynchjustrules/ezj9w/


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -