POV-Ray : Newsgroups : povray.off-topic : More web madness : Re: Another day Server Time
4 Sep 2024 01:16:13 EDT (-0400)
  Re: Another day  
From: Le Forgeron
Date: 29 Sep 2010 03:58:10
Message: <4ca2f192$1@news.povray.org>
Le 28/09/2010 16:44, Invisible a écrit :
>>> OK, so adding
>>>
>>>    @media print
>>>    {
>>>      img {max-width: 100%;}
>>>    }
>>>
>>> causes all images to be scaled to fit the width of the paper.
>>> Unfortunately the image height remains completely unchanged, wildly
>>> distorting the image aspect ratio. (!)
>>
>> I get a pleasant result (at least in preview from Firefow) with
>> img {max-width: 17cm; max-height: 24cm; background: white ;color:#000; }
> 
> This requires you to know what the dimensions of the paper are, and what
> the correct aspect ratio of every image is.

Yes and No.
Notice we set max-*, not width & height... so the max-* does not define
any ratio: in firefox preview, at worst one of the max is inforced (and
the other dimension remains lower) if the number of pixel reach the
dimension... If the picture is smaller, it is not expanded.
(Problem: we do not have access to the DPI either!)

the problem with "100%" is that it is relative to the container... an
absolute size would be better: I used "cm" but you can search for some
units more appropriate (hint: CSS3 vm/vh/vW ?) (viewport...)


-- 
A: Because it messes up the order in which people normally read text.<br/>
Q: Why is it such a bad thing?<br/>
A: Top-posting.<br/>
Q: What is the most annoying thing on usenet and in e-mail?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.