I have an image id="img1" with "width=100%;height:auto". And another image id="img2" ... in an almost un-related parentage, that needs to be fixed width but the same height as img1.
I found here: [Set height of <div> = to height of another <div> through .css that:
If you're open to using javascript then you can get the property on an element like this: document.GetElementByID('rightdiv').style.getPropertyValue('max-height');
And you can set the attribute on an element like this: .setAttribute('style','max-height:'+heightVariable+';');
So I tried:
var imgHeight = GetElementByID('img1').style.getPropertyValue('height');
.setAttribute('style','height:'+imgheight+'px';');
First issue is how to get it to work. Second is, would it resize when visitor resizes/rotates their device?