jasonbradberry
jasonbradberry

Reputation: 873

Vertical responsive image (max-height) not working in Firefox

I'm looking for a way to set an image to the 100% height of the browser window (with a small padding at the bottom), centred on the page.

I've set up an example in codepen, which works great in Chrome and Safari, but not Firefox, where the image shows at full size. What am I missing?

http://cdpn.io/sHJhl

Upvotes: 2

Views: 4924

Answers (1)

André Dion
André Dion

Reputation: 21708

.photo-bkg also needs its height set:

.photo-bkg { height: 100%; }

Here's a working fork of your pen.

Upvotes: 4

Related Questions