Each browser does sizing according to it's own rules, but specifying only width 
generally throws it into aspect-ratio match mode which will be approximate.
Further complicating things is that height and width are interpreted as "CSS 
Pixels" which are not always exactly screen pixels (depending on CSS and 
accessibility settings, particularly the display DPI settings).
Try specifying both width and height to get a proper clipping box and see if 
that works or if you see the same 1.4:1 ratio on both height and width (which 
would indicate an accessibility ratio setting on the device or O/S side).
You might also wish to (temporarily) set the CSS width and height properties 
and overflow mode as follows to see if the image really is outside what the 
browser *thinks* is the correct size : style="width: 270; height: NNN; 
overflow: hidden"  (replace NNN with the correct height, of course).
If the image isn't clipped but is still 380px wide with the style set, then 
it's almost certain the device has accessibility or other settings to map 
multiple device pixels to one "CSS Pixel".

If your target environment fully supports CSS3, you might try using the 
resolution style (style="width: 270; resolution: 1dppx !important") to 
explicitly request a 1:1 pixel ratio for that element (browsers get final say 
and may ignore resolution in favor of accessibility).

On 03/27/2015 05:46 PM, [email protected] wrote:
> When I use <img src=image.jpg width=270>
> and then view/screen capture the result,
> the actual width is 380 pixels.  Why is that?
> 
> How can I specify the desired size and get
> what I specify?
> 
> 
> 
> ---------------------------------------------------
> PLUG-discuss mailing list - [email protected]
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> 

Attachment: signature.asc
Description: OpenPGP digital signature

---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss

Reply via email to