optional middle containment for x, y -- useful for slider