Equal Heights: CSS fix for nested elements

For issue #4187, this is a rebase of #5760.