Space after <ol>s not exporting to Word.

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Space after <ol>s not exporting to Word.

Post by gregoryrwalker »

Here's the deal. I use a margin-bottom setting of 1em on my <ol> tags to keep a line of space between a list and the following paragraph. So it looks like this...

1. line of text.
2. line of text.
3. line of text.

next paragraph.


and not

1. line of text.
2. line of text.
3. line of text.
next paragraph.


Works great in my online output. However, in my printed documentation the <ol> tag settings don't seem to be imported, so there's no space after the last line of a list. I guess I could create a <li> style with the spacing included and use it on the last item in a list, but that seems like a clunky solution. Any ideas?

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

Re: Space after <ol>s not exporting to Word.

Post by LTinker68 »

In the print area of the stylesheet, try setting the margin-bottom on the <ol> to a set distance instead of a proportional distance. In other words, set it to 4pt or something like that. Proportional measurements (ems or %) are really just for online output. So you can use the 1em for online and the 4pt for print.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Re: Space after <ol>s not exporting to Word.

Post by gregoryrwalker »

Thanks, Lisa. I thought the same thing, but it doesn't seem to work.

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

Re: Space after <ol>s not exporting to Word.

Post by LTinker68 »

Did you set it to some insanely amount, like 14 pts?

Actually, now that I think about it, the <ol> tag might be the wrong one to apply it to -- that's not a tag that Word uses. It would probably work if you applied it to the <li> tag, but you said you didn't want to do that.

I wonder if a complex selector would work? There is a type of selector where you can specify that if a <li> tag is immediately followed by a <p> tag, then do... Whatever. I don't use that type of selector tag much so I've never tested it to see if gets passed to Word. But if you want to try it, you can read more at http://www.w3.org/TR/1999/WD-CSS3-selectors-19990803 -- I think the complex selector you want is in the combinators section of the document.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Space after <ol>s not exporting to Word.

Post by KevinDAmery »

Not sure if this is applicable for you, but the way I sidestep this problem is I have a Margin-top attribute applied to my P tags (12pts I think--been a while since I coded it). That takes care of spacing between paragraphs, and also takes care of spaces after lists.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Re: Space after <ol>s not exporting to Word.

Post by gregoryrwalker »

Lisa, if you set the margin-bottom on the <li> it puts space between all the list items, which breaks up the nice "block of information" look that I"m trying to preserve.

I did set the margin-bottom to 20pt without anything changing. I think you're right that the <ol> just isn't passed on to Word.

If the complex selector works then I'll be sure to report back my success. Thanks again.

Kevin, I'd thought about changing the margin-top on the <p> tags, but then I run into the problem of having headings that seem too far offset from the information they cover. I like the heading to rest close to the first paragraph and 10pts between paragraphs. To my eye the 10pts between the header and the first <p> looks like an enormous gulf.
--gw
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Re: Space after <ol>s not exporting to Word.

Post by gregoryrwalker »

Okay. Probably I'm not employing the complex selector style correctly, but if I am it doesn't seem to get passed to Word. Sigh. Here's how it looks in a snippet of my CSS code

Code: Select all

@media Print
{
	ol > li:last-child
	{
		margin-bottom: 20pt
	}

	p.Normal
	{
		font-family: Garamond;
		text-align: justify;
	}
The <li> tags that I'm using actually have classes attached to them (i.e. li.h1, li.h2, li.h3 and li.h4). I tried selectors that called all four specifically, but to no avail. I'll tinker around a bit with it and see if I can't make something work.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Space after <ol>s not exporting to Word.

Post by LTinker68 »

Instead of ol > li:last-child, try li:last-child > p.

Or, just try setting li:last-child to have a margin-bottom value. In other words, don't use a complex selector, just set the property for li:last-child. (Although, again, that may be something that Word doesn't understand, but try it anyway.)

Or, you can do this... Kind of annoying, but if the two options above don't work, then this will be the easiest workaround to implement (if you can remember to do it every time). Create a new custom <li> class called "lastItem" or something like that. Set the margin-bottom value on the new class to whatever amount you want. Create a list in a topic as you normally would, but select the lastItem class for the last <li> tag. That way you have the normal amount of distance between the other items in the list, but there'd be extra distance after that last list item.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Re: Space after <ol>s not exporting to Word.

Post by gregoryrwalker »

Well, neither option worked, but that's okay. I'd already created a last line style, but was looking for an alternative. Perhaps they'll have a little more control over these kinds of things when Flare 4 hits the ground with built in printed documentation support. At least I hope. I have a lot of hope for built in printed documentation support. Thanks a bunch, though, for your help.

--gw
Post Reply