When your website means business.

CSS | Type: CSSProportional scaling of a container

There is more detail at the reference link for complex containers.

.parent {
  height: 0;
  padding-bottom: 56.25%; /* 16:9 */
  position: relative;
}

.child {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

Reference Links

Menu
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Cookies Notice