Home › Forums › CSS › vertical align two class with youtube › Reply To: vertical align two class with youtube
March 4, 2015 at 2:49 am
#197242
Member
I think the answer lies in the padding-bottom
To maintain a ratio of a 100% wide div we need to set the padding-bottom as 56.25% (9/16)….
But our parent div isn’t 100% wide…it’s 40% wide so we need to calculate that number again
This 56.25 / (4 * 10) give us 22.5 but we don’t actually need to do that ourselves because we can use calc
.