February 28, 2012
Background smaller than containing div (of variable size)
Question by danapaige
I want to create a slightly indented background behind embedded media, for which the size varies. It should look like this:
See how the green background is slightly indented from the top and bottom of the youtube video? I have gotten everything else to show up as I want, I just can’t figure out how to position the background slightly inside of the embedded media item. Especially since I know the media item size will change.
You can see what I have so far on JSfiddle.