Restrict content to within a target container using letterboxing or pillarboxing