You’ve probably seen the toolbar from StackOverflow (at the top of this page), how it hangs outside the viewport. Both of the edges hang off the page and so does the top. I have tried this so many times but can’t find an answer. How would I make a div behave like this- in html, css, or javascript- can someone help me? (Position:fixed; is not what I’m looking for.)
You’ve probably seen the toolbar from StackOverflow (at the top of this page), how
Share
it is just a div, but you have to turn off the paddings in the body that is around:
a div automatically has a
widthof100%a live sample here