Have the child of a fixed element take the whole page

Hello everyone !
I found myself in a very peculiar situation: I’m using Microsoft library’s office-ui, and one of its elements is using a div with a fixed position.

The problem is that, in that very element, I need a button that would spawn a dialog box centered in the middle of the viewport, which I would normally do with a poistion:fixed css rule.

So I was wondering, fellow campers, if you could help me on this one : is it possible to have the child of a div whose parent is position:fixed to stretch to the whole page ?

Thanks a lot !

I’m not really sure what your asking for to be honest. Can’t you just give the text container position: relative; and position it?

.modal {
  background: #009688;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}