Hello everyone,
I have a 2-columns body frame in my page layout.
I would like my h1 to span across the two columns. Is it possible? Is there a CSS property to do that?
Thanks in advance for any hint.
CSS property to span an element across multiple columns?
-
kwag_myers
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: CSS property to span an element across multiple columns?
It doesn't show up in the Stylesheet Editor, but you can add the following code to your CSS using NotePad (I've done this before with text shadowing):
I got this from w3schools, and there's no support information on Firefox.
Code: Select all
h1
{
column-span:all;
-webkit-column-span:all; /* Safari and Chrome */
} "I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Re: CSS property to span an element across multiple columns?
This wouldn't work - CSS3 column styles aren't related to Flare's page layout columns.
Re: CSS property to span an element across multiple columns?
You'd have to create two topics. One is set to use the normal one-column page layout and the topic contains just your heading text. The second topic is set to use the two-column page layout and contains the main content for the "topic". You put both topics in the TOC. When the output is built, the two-column content immediately follows the heading text. To the end user they appear to be one topic.mhd wrote:I have a 2-columns body frame in my page layout.
I would like my h1 to span across the two columns. Is it possible? Is there a CSS property to do that?
Alternatively, you have a page layout used just for that content and you hard-code the heading text into a header or decoration frame, for example, perhaps on the Title or First page of the page layout. Your body frame is set to two columns and is positioned below that header frame, and your Normal or Right/Left pages have the two-columned body frame as well. I seem to recall that option has problems picking up the heading in the TOC, though, which is why I use the previous method.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: CSS property to span an element across multiple columns?
This idea doesn't sound quite right - a single page in the output can't use/merge two different page layouts.LTinker68 wrote:When the output is built, the two-column content immediately follows the heading text. To the end user they appear to be one topic.
You can do this using a page layout if you have a two body frames in the layout. For example, add one body frame at the top of the page layout (the heading), and a then second body frame underneath which is set to use columns. In your stylesheet, set the heading style property frame-break-after to always. This means that the heading will appear in the top frame of the page layout, and the content following the heading will be put in the next frame in the layout (which has the columns).
If that solution is too rigid, and you need to have the headings/columns in different positions on the page, then an alternative is simply to lay this out using a table.
-
kwag_myers
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: CSS property to span an element across multiple columns?
I'm just thinking out loud here (so to speak), but I wonder if you could apply a z-index to the heading so that it lays under/over the columns? You would also need to have a paragraph style with a margin-top value high enough to keep the text away from the heading.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Re: CSS property to span an element across multiple columns?
I didn't open my project in Flare, I just looked at the files in Windows Explorer. I saw two files, so that's how I thought I had it set up. I just opened the project in Flare, and now I can't figure out why I have it set up the way I do. I have a topic that has "Index" and an indexProxy, but it's pointing to a page layout with a two-column body. I have another topic that has just the indexProxy, but I don't have that topic in the TOC, so that must be left over from when I was trying to get this to work. The problem used to be that if the "Index" heading was in the two-column format, then the index entries in the second column used to start way up at the top of the second column, which put them even with my heading, which I didn't like. Somehow I either got it set up so that that doesn't happen, or Flare changed its behavior at some point so that the second column content doesn't go above the h1 tag.Dave Lee wrote:This idea doesn't sound quite right - a single page in the output can't use/merge two different page layouts.LTinker68 wrote:When the output is built, the two-column content immediately follows the heading text. To the end user they appear to be one topic.
Now I'm just confused. I don't know how I got that to work.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: CSS property to span an element across multiple columns?
I don't think z-index is supported in PDF outputs.kwag_myers wrote:I'm just thinking out loud here (so to speak), but I wonder if you could apply a z-index to the heading so that it lays under/over the columns? You would also need to have a paragraph style with a margin-top value high enough to keep the text away from the heading.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.