css - How to make an image responsive on PS4? -


i on console viewing site working on , noticed banners looked off.

<div class="blog-post-featured-banner">         <img width="1600" height="900" src="#"> </div>  .blog-post-featured-banner {     height: 50vh;     overflow: hidden;     display: -webkit-flex;     display: -ms-flexbox;     display: flex;     justify-content: center;     align-items: center;     position: relative; } .blog-post-featured-banner img {     width: 100%;     height: auto; } 

it looks fine on desktop, when view on ps4 looks img had height:100%;, looked squished. expected behave way on desktop, takes 100% width of screen , height hidden in overflow. given i'm viewing on tv expected bit pixelated. needing large image? tv 55".

sort of side question, in div holds image, trying make image vertically , horizontally centered in "frame", how adjust css so, if possible.

the browser playstation use might not support viewport units. viewport units gaining support on modern browsers, however, there cases unit not supported or bugs have been found.

try setting html , body tag's height 100%. set "blog-post-featured-banner" height 50%. should replicate trying achieve currently.

<div class="blog-post-featured-banner">      <img width="1600" height="900" src="#"> </div>  html, body {     height: 100% }  .blog-post-featured-banner {     height: 50%;     overflow: hidden;     display: -webkit-flex;     display: -ms-flexbox;     display: flex;     justify-content: center;     align-items: center;     position: relative; } .blog-post-featured-banner img {     width: 100%;     height: auto; } 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -