Order of layer question

i dont know how to explain this very well, so i attached a picture. how do i get the white box to be behind the dark red one to the left and in front of the one to the right?
thanks.

boxquestion.JPG (36.7 kB)

depth buffering