Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Measurement units


Message #1 by kotzefj@m... on Wed, 21 Feb 2001 14:42:45
CSS styles allow you to set the size in inches or centimetres (your OS
should know your resolution and monitor size for WYSIWYG applications).

For example:

<TEXTAREA STYLE="width=1in" rows=5>1 inch long</TEXTAREA>
<TEXTAREA STYLE="width=10cm" rows=5>10 centimetres long</TEXTAREA>
<SPAN STYLE="position:absolute;width=1cm"> </SPAN>


If you had an object on your page that you knew was one centimetre long (the
last example above would work well) you could easily determine the ration of
pixels / centimetre. Then continue your work in pixels.

I've never tried this, but it just might work! Good luck.


Anil

Sevina Technologies
www.Sevina.com



----- Original Message -----
From: <danielw@w...>
To: "javascript" <javascript@p...>
Sent: Wednesday, February 21, 2001 2:52 PM
Subject: [javascript] Re: Measurement units


> Phoo! Not really. Even if you knew your client's screen resolution, how
would you know what size of monitor they were viewing on? Some things realy
aren't doable.
>
> Daniel Walker
> Wrox Press
>
> > I've looked at various ways to find the click position on a web page.
> > Although this is fairly simple, is there a way to change coordinates
from
>
>
>


  Return to Index