Reputation: 24059
I have a div, and I wish to position it offscreen, at the bottom - I will then animate it in via jquery.
Bottom 0 just aligns it to the bottom of the screen but how can I get it offscreen?
Upvotes: 0
Views: 771
Reputation: 512
just use margin-top: 100%; If you put it inside body then, it will use margin-top: 100% on the body, so it all falls out of the body. If you use overflow:hidden on body then it will work out fine i guess.
So your css looks like this:
body{
overflow: hidden;
}
#otheritem{
margin-top: 100%
}
That's a lot of body-text.
It might as well be html in stead of body. I'm not sure.
Upvotes: 1
Reputation: 311
you can do it just hidding the element with: display: none
or visibility: hidden
. or, you can set bottom: -100%;
inside of a element with overflow: hidden;
Upvotes: 0