body { overflow: hidden; margin: 0; } .container { position: relative; max-width: 600px; margin: 0 auto; } img { width: 100%; } .caption { position: absolute; display: block; bottom: 0; left: 0; right: 0; padding: 15px; text-align: center; background: #000; background: rgba(0, 0, 0, .8); color: #fff; font: 14px/24px sans-serif; margin-bottom: 0; }