W3C home > Mailing lists > Public > www-style@w3.org > June 2005

Re: Proposal: content-vertical-alignment

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 12 Jun 2005 21:00:02 -0700
Message-ID: <001301c56fcc$609e5d50$3201a8c0@TERRA>
To: <www-style@w3.org>, "Emrah BASKAYA" <emrahbaskaya@hesido.com>

Just for your information:

%% units [1] allow to align content vertically or
horizontally in any proportion.

<html>
 <head>
  <title>Test</title>
  <style> 
 body { 
   width:100%; height:100%; margin:0;
 }
 #content 
 { 
     width:100px; 
     height:100px; border: 1px solid black; 
     margin:70%% 30%% 30%% 70%%;  
 }
  </style>
 </head>
 <body>
 <div id="content">Test</div>
 </body>
</html>

If you will load this HTML into browser.exe 
application from HTMLayout Demos 
(available from the page 
 http://www.terrainformatica.com/htmlayout/ )
you will see following picture:
http://terrainformatica.com/w3/ppunits.png

margins of #content div are set to
top and left:70%%, right and bottom: 30%% - 
70% and 30% of space left from container 
inner space minus dimensions of block itself.

[1] %% units - "percentage from free space" -
- http://www.terrainformatica.com/htmlayout/fspu.whtm

Best regards,

Andrew Fedoniouk.
http://terrainformatica.com
Received on Monday, 13 June 2005 03:58:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:37 GMT