How good browsers do it

We use the same image for both containers:

We use them as background images with top left values for the parent container and botom right values for the child container.

Then we use top and left padding on the parent container and negative right and bottom margin on the child container (with equal values).