How can I hide an element off the edge of the screen?
Just add overflow:hidden
to the css. That should do the trick.
Yes, just create an enclosing div with overflow: hidden
, like this:
.outer {
overflow: hidden;
position: relative;
}
.inner {
position: absolute;
height: 100px;
width: 100px;
right: -50px;
top: 50px;
}
<div class="outer">
<div class="inner">
CONTENT
</div>
</div>
Example: http://jsfiddle.net/Uj3eQ/