The title pretty much asks the question but I know using
overflow-y: hidden
overflow-x: hidden
div
div
overflow: hidden
div
overflow: hidden
The below jsfiddle based on the example in the question provides the desired effect of cutting off only the bottom edge using clip
:
https://jsfiddle.net/ejhyz7t3/2/
The full code is copied below for reference:
HTML
<div class="outer-container">
<div class="inner-container">
</div>
</div>
CSS
.outer-container {
background: red;
height: 100px;
margin-top: 100px;
width: 150px;
padding-left: 50px;
}
.inner-container {
background: green;
height: 200px;
width: 100px;
transform: translateY(-50px);
position: absolute;
clip: rect(0, 100px, 150px, 0);
}