How to make ui on top of other ui

Hello! I am having a problem with the position of UI. I have an inventory system. And i am using a grid layout to organize slots. And i am parenting “Item” game objects to the slots. And. When i drag my items. They go infront of slots before the slot the item is parented too. And behind the slots after the slot the item is parented too. I know this is because of children sorting. I am trying to fix this. Moving the ui objects on the Z axis doesn’t work either. What can i do?

You can Set this in two ways:

  • Change the order of the gameobjects
    in the canvas.
  • set siblings of the gameobjects.