can't change page-break-before=always for <h1>

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

can't change page-break-before=always for <h1>

Post by bonnie »

For the h1 tag of my print medium, page-break-before is set to always. I can't get it to change to (not set). It seems to be "inheriting" this property from somewhere and I can't figure out where it's coming from. For my default medium, page-break-before of h1 is (not set).

The result of this page-break-before=always in the print medium is that each h1 paragraph starts a new page in my FrameMaker output.

If I change page-break-before to avoid for h1, then when the h1 would naturally fall at the top of a page, it drags another line from a previous paragraph down to that page from the previous page (to avoid a page break before it).

Where do you suppose the h1 tag is getting the always setting for page-break-before?

Thanks,
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: can't change page-break-before=always for <h1>

Post by LTinker68 »

If you have a container tag (such as a DIV) that encompasses the h1 tag, then it could come from that, although that's doubtful. If it's not in a container tag, then the only tags h1 can inherit from are the body or html tags.

BTW, are you checking in both the default and print mediums? You might have it set to "not set" in the default medium but have something else set in the print medium. If all else fails, you could open the Internal Text Editor manually and set the correct value there.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: can't change page-break-before=always for <h1>

Post by bonnie »

If you have a container tag (such as a DIV) that encompasses the h1 tag, then it could come from that, although that's doubtful. If it's not in a container tag, then the only tags h1 can inherit from are the body or html tags.
None of this is the case. So this part is still a big mystery to me.
You might have it set to "not set" in the default medium but have something else set in the print medium.
It is in the "print" medium where I'm having the problem. The default medium is set to (not set). But the "print" medium is stuck on page-break-before=always for some unknown reason.
If all else fails, you could open the Internal Text Editor manually and set the correct value there.
There isn't any way to set a property to (not set) in the text editor, since (not set) is the result of NOT having a value included for the property, which then defaults to the "always" setting (in my case).

BUT I discovered that I could set page-break-before to either "inherit" or "auto" and get the results I needed. (Not sure what these two options are, but either one works in this case.) If you could explain what these options are, that would be very helpful.

Thanks very much for your ideas.
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: can't change page-break-before=always for <h1>

Post by LTinker68 »

bonnie wrote:There isn't any way to set a property to (not set) in the text editor, since (not set) is the result of NOT having a value included for the property, which then defaults to the "always" setting (in my case).
Actually, just deleting the offending line of code is the same as setting it to "not set", because if it's not included in the stylesheet file, then it'll use whatever was set for the "default" medium, and if nothing was set, then it goes with the browser's default behavior (online output) or the destination program's default behavior (Word/Framemaker).
bonnie wrote:BUT I discovered that I could set page-break-before to either "inherit" or "auto" and get the results I needed. (Not sure what these two options are, but either one works in this case.) If you could explain what these options are, that would be very helpful.
Inherit is what you mentioned before -- it uses the same setting as its parent tag. Auto basically means it'll try to make a decision on its own. Personally, I never use those two. (Except occasionally "auto" for margin settings.) Inherit is the default behavior anyway and auto isn't consistent, especially across browsers. If you just delete the page-break-before=always row from the stylesheet, you should be fine. And when you look at that tag in the Stylesheet Editor after saving the change to the stylesheet, then you should see it changed back to "not set".
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: can't change page-break-before=always for <h1>

Post by bonnie »

If you just delete the page-break-before=always row from the stylesheet, you should be fine. And when you look at that tag in the Stylesheet Editor after saving the change to the stylesheet, then you should see it changed back to "not set".
That's what I would have thought.
But the problem is: there is no "page-break-before=always" code for h1 in my stylesheet when I look at it in the Internal Text Editor. That's why this has been such a mystery. It's not there, but STILL I get "page-break-before" defaulting to "always" in the Stylesheet Editor. (Strange but true.)

This is the code in my stylesheet for the default medium:

Code: Select all

h1
{
	font-weight: bold;
	color: #000000;
	margin-top: 2em;
	margin-bottom: 0.5em;
	font-family: 'Times New Roman', ' serif';
	font-size: 140%;
}
This is the code in my stylesheet for the print medium:

Code: Select all

	h1
	{
		color: #000000;
		font-weight: bold;
		font-family: 'Lucida Sans Unicode';
		page-break-after: avoid;
		page-break-inside: avoid;
		font-size: 15pt;
		line-height: 18pt;
		margin-bottom: 4pt;
		margin-top: 30pt;
	}
But when I look at the stylesheet in the Stylesheet Editor, the "page-break-before" shows "always" (unless I select "inherit" or "auto"). If I select "default" in the Stylesheet Editor, it defaults to "always", but when I save the file and I look back in the Internal Text Editor, there is no "page-break-before: always" line. (IF I select "always" in the Stylesheet Editor, then the "page-break-before: always" DOES appear in the Internal Text Editor. But if I select "default", in the Stylesheet Editor, the "page-break-before: always" does NOT appear in the Internal Text Editor.

I've also checked the body tag and the html tag as you suggested and both have no value set for "page-break-before". (The "body" tag does have orphans=2 and widows=2, by default, for whatever that's worth.)

So there's some really quirky thing going on, and I'm totally baffled.

Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: can't change page-break-before=always for <h1>

Post by LTinker68 »

You might want to send the project to MadCap, if you can. It's hard troubleshooting it without seeing the entire project. And if it is a bug, being able to consistently get the problem in your project will help them.

Does the problem happen if you create a brand new project? That'll narrow down whether it's something in the project or whether something odd happened to your installation of Flare.

BTW, have you modified any of the files in the Flare program file folder? Doing so would filter those changes down to all projects, so maybe a change made there is causing problems. But if it doesn't happen in a brand new project, then it's not coming from the Flare program folder, so it's something in that particular project that's causing the problem.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: can't change page-break-before=always for <h1>

Post by bonnie »

You might want to send the project to MadCap, if you can. It's hard troubleshooting it without seeing the entire project. And if it is a bug, being able to consistently get the problem in your project will help them.
You're right. It seems this can't be sorted out without having access to the whole project.
I greatly appreciate all your attempts to help me figure this out.

Bonnie
Post Reply