I was wondering how i can achieve the following:
I have two divs. One is positioned absolutely, while the other is a simple block element. I need the block element to actually overlap the absolutely positioned container.
Here's a picture of what i need to do:
The red box is positioned absolutely, the blue box is a normal block element (inside a flexbox, but i don't think that changes anything, correct me if im wrong)

I've tried achieving this with z-index, but it doesn't seem to work.
Thanks
Edit: Here's a fiddle to show more or less my code.
https://jsfiddle.net/xzp284vn/
<div class="container">
  <div class="block">
  </div>
  <div class="absolute">
  </div>
</div>
.container {
  display: flex;
  justify-content: flex-end;
  position: relative;
  width: 400px;
  height: 300px;
}
.block {
  border: 1px solid blue;
     width: 40px;
  height: 300px;
}
.absolute {
  border: 1px solid red;
  position: absolute;
  top: 0;
  left: 0;
   width: 400px;
  height: 40px;
  background: yellow;
}
 
    