Position: fixed & display: flex

I have a container at the top of my page, with pictures in it, evenly spread out.

Is there a way of fixing the the container to top of page? If i use “position: fixed”, the Flexbox features disappear.

.doctorpicscontainer {
  background-color: #cacaca;
  padding: 15px;
  display: flex;
  justify-content: space-between;
}

What do you mean by:

I tried it out and it worked just fine.

i worked out that i needed to add:
width: 100%

thanks for your help

1 Like