Basically, name the layers and order them semantically, as you would in a HTML-document.

Click here for an example.