css - if you know an image's dimensions, how do you scale it without a reflow in a fluid container -


i know dimensions of image, it's located in fluid container (the red area, resize window width). want avoid reflows, meaning don't want size of red area ever change.

http://codepen.io/anon/pen/afmfh

how can setup html/css no reflow occurs?

i think may looking overflow: hidden on div. down side if expand image won't fit in div.

div {   width: 50%;   background-color: red;   overflow:hidden; } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -