- From: Julian Viereck <julian.viereck@googlemail.com>
- Date: Wed, 27 Mar 2013 23:09:03 +0100
- To: Håkon Wium Lie <howcome@opera.com>
- CC: spec:w3c:style <www-style@w3.org>, robert <robert@ocallahan.org>, me <julian.viereck@gmail.com>
(Sorry, I've replied to Håkon only and not included the mailing list on \cc. Moving this to public mailing list again.) On 3/27/13 11:53 AM, Håkon Wium Lie wrote: > Julian Viereck wrote: > > > > Going down this path, one requirement would be to position elements > > > wrt the page area -- I'd say that's an even more fundamental reference > > > than then page box. > > > Can we do both? E.g. > > > > <div style="position: pagebox">...</div> > > <div style="position: pagearea">...</div> > > The keywords seem right. But I'm unsure how to achive the layouts we > need. For example, how would you specify the top-left-corner margin > box using this syntax? > > http://www.w3.org/TR/2013/WD-css3-page-20130314/#margin-box-def > > The trouble is that two of the edges (top, left) are relative to the > pagebox, while the other two (right, bottom) are relative to the > two of the edges of the pagearea (top and left edges). > For example, how would you specify the top-left-corner margin box using this syntax? You can only if you also control the margin, e.g.: @page { margin-left: 2cm; margin-top: 2cm; } Then you can do: <div style="position: pagebox; top: 0px; left: 0px; width: 2cm; height: 2cm">...</div> Alternatively, this can be solved by exposing the current's page margin to the "calc" function. Not sure about the concrete naming, but how about this: <div style="position: pagebox; top: 0px; left: 0px; width: calc(page-margin-left); height: calc(page-margin-top)">...</div> - Julian > > -h&kon > Håkon Wium Lie CTO °þe®ª > howcome@opera.com http://people.opera.com/howcome >
Received on Wednesday, 27 March 2013 22:09:26 UTC