[TriLUG] image-platform problem

Lance A. Brown via TriLUG trilug at trilug.org
Mon Mar 26 15:00:10 EDT 2018



mver via TriLUG wrote on 3/26/2018 2:01 PM:
> Link to the [political] website is:
> 
> https://sites.google.com/s/0B03ZCxlTaK_wVEpycDZHMHJzRjQ/p/0B03ZCxlTaK_wdU1xRnRWV3VzeTA/edit

Greetings,

The rendered HTML for your page in Chrome has:

<div class="yaqOZd IFuOkc" style="background-size: cover;
background-position: center center; background-image:
url(https://lh4.googleusercontent.com/hrgiGEyiHpCZ28iHRjVhI1OJE65nKV6krl9Ft1HAAQHqbzzBCH7fwRV4JrojltTV4-E-x7s=w16383);"
jsname="LQX2Vd"></div>

"background-size: cover" tells the browser to:

"Scales the image as large as possible without stretching the image. If
the proportions of the image differ from the element, it is cropped
either vertically or horizontally so that no empty space remains."
-- https://developer.mozilla.org/en-US/docs/Web/CSS/background-size

so it scales the image to fill the required space and crops whatever
hangs over.  I expect the image gets a very different HTML treatment
when you use it on facebook or twitter.

For what it's worth, that website looks quite nice in the Chrome browser
on my Samsung Note 5.

--[Lance]


More information about the TriLUG mailing list