POV-Ray : Newsgroups : povray.off-topic : More web madness : Re: Another day Server Time
4 Sep 2024 01:21:54 EDT (-0400)
  Re: Another day  
From: Invisible
Date: 29 Sep 2010 04:03:10
Message: <4ca2f2be$1@news.povray.org>
>>> 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!)

Yes. And I had *hoped* that by setting only the maximum width, Firefox 
would figure out that the height should be similarly adjusted. But no...

> 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...)

Yes. And if the container is the entire page, it means that the image 
ends up the exact right size for whatever size of paper you happen to be 
using (which I cannot know ahead of time).


Post a reply to this message

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