Re: [css2xslfo-support] region style not selected, page names, margins
Brought to you by:
wdonne
From: <wer...@re...> - 2006-03-14 08:32:44
|
Hi Brad, See my inline comments. Best regards, Werner. Brad Clements wrote: > I found something odd with 1.3, I am thinking I'm doing something wrong= . >=20 > I have an xhtml document with embedded stylesheet. It works fine in Fir= efox. >=20 > In part, I have this style: >=20 > div.invoice_header { > font-size:9pt; > region: top; > precedence: true; > width:100%; > height: 3in; > } >=20 >=20 > Then, in the body, I have this: >=20 > <body> > <div class=3D"invoice_header" > > <table style=3D"table-layout:fixed;width:100%;"> > <col width=3D"1*" /> > <col width=3D"1*" /> >=20 > (snipped) >=20 >=20 > What happens is the div is not treated as a top region, instead it's pu= t into the=20 > body flow. If I change the color in the stylesheet, the changed color i= s reflected=20 > correctly in the browser, but not in the postscript output from fop. So= I think=20 > csstoxslfo isn't connecting the div class to the stylesheet. >=20 > I used to have <table class=3D"invoice_header"> and that worked ok. >=20 > But when I changed from table to div, region activation of the div stop= ped=20 > working. >=20 > To make this work, I have to do add a style statement to the div: >=20 >=20 > style=3D"region:top;height:3in" >=20 >=20 > Am I doing something wrong? This is because of the underscore in "invoice_header". The underscore is = not a legal CSS character, which makes it an illegal rule and those should be i= gnored according to the spec. >=20 > -- >=20 > I am not sure what @page name to use.. I'm doing onsided output, so I = have this=20 > in my embedded stylesheet: >=20 >=20 > @page onesided > { > margin:1%; > }=20 >=20 > What I really want to do is to reduce the margins on all pages. I also = tried >=20 > margin: 0.25in 0.25in 0.25in 0.25in=20 >=20 > But that had no effect either. >=20 > How do I set the margins for all pages to be the same smaller size than= the=20 > default? >=20 > What page names *should* I be using to apply to "the default starting p= age". In=20 > the case of onesided, I guess I have first-onesided and onesided.. That= it? >=20 In this case you can use an anonymous page. The following should work: @page { margin: 10%; } For your first page you can then say: @page :first { margin: 20%; } > -- >=20 > I use table-layout:fixed;width:100% everywhere in my document, but I st= ill get=20 > these complaints: >=20 > INFO: table-layout=3D"fixed" and width=3D"auto", but auto-layout not su= pported =3D>=20 > assuming width=3D"100%" >=20 > But width is already 100% on the table, maybe it's complaining about th= e width of=20 > the parent div? =20 >=20 I think at least one of the columns has no explicit width. Combined with = the 100% on the table this comes down to automatic table layout. > -- >=20 > It seems that width units 'ex' is not allowed, but 'em' works. Is that = a FOP=20 > limitation? >=20 > or, is 'ex' an html -only thing? In CSS ex is a valid unit, but not in XSL-FO. I should document that. >=20 >=20 >=20 >=20 >=20 --=20 Werner Donn=E9 -- Re BVBA Engelbeekstraat 8 B-3300 Tienen tel: (+32) 486 425803 e-mail: wer...@re... |