Forum How do I...?

Different number of columns on first page using @page:first

web559
I am trying to create a layout with one column on the first page and two columns on all subsequent pages. The flow of text would be continuous from the first page to the next—i.e., the first page isn't a separate section I can wrap in a div.

At first I had this column CSS for the body element:
 columns: 2;
 column-gap: 1.5em;


Then I added
columns: 1;
to @page:first, but it had no effect. I tried moving the 2 column code from body to @page, but then columns didn't work at all.

Is it possible to get this effect, different column numbers per page, with Prince/CSS3?

Please forgive me if I'm misunderstanding something obvious about the @page elements.
mikeday
No, currently it isn't possible to get this effect with Prince or CSS. It would be nice to have, though!
web559
I'm wondering if there is any javascript or CSS workaround for this.

I tried adding an :after pseudo-element to @page:first, thinking I could use @page:first:after to insert a unique string of text, and then use javascript to select everything before it. But @page:first:after had no effect.

My googling for javascript interaction with the @page selector did not turn up anything useful either. Any ideas? My aim in this case is to is to have the first page use one column and subsequent pages use two.
mikeday
Honestly, I can't think of a way to do this right now that doesn't involve some level of manual intervention. I think it will require a new CSS property or two.
jim_albright
This is definitely a publication request.
In a similar vein is making the first X words of a section in small caps to get you started reading the paragraph. I haven't studied this for a solution yet but think it could be done with js.

Jim Albright
Wycliffe Bible Translators

mikeday
Yes, selecting a fixed number of words can be done with JavaScript, as it does not depend upon layout.
hughmcguire
Hi Mike, Just checking in to see if there have been any advances on this request, ie Different number of columns on first page ?

mikeday
No, not yet. We'll get there, eventually. :)
hughmcguire
ok thanks!
pauloamgomes
Hi there, this is an old question, but anyone is aware if that is actually possible?
mikeday
Not with CSS yet, no.
pauloamgomes
Hi Mike, thanks!