Mif2Go: controlling graphics position
Jim Owens
jowens at magma.ca
Mon Nov 17 07:23:27 PST 2008
Thanks, this does just what I need.
Jeremy H. Griffith wrote:
> On Thu, 13 Nov 2008 13:00:40 -0500, Jim Owens <jowens at magma.ca> wrote:
>
>> I'm producing MS HTML Help, and currently trying to position the
>> graphics using Mif2Go.
>>
>> In my Frame source, some graphics are anchored "run into para," and
>> others are anchored "below current line" (with the anchor at the end of
>> the paragraph). I want each "run into para" graphic placed beside the
>> para, to the right, and I want each "below current line" graphic placed
>> below the para, aligned with the left margin.
>>
>> Accordingly I have added this instruction to the config file:
>>
>> [GraphAlign]
>> ; place "run-in" graphics to right of para
>> * = right
>
> That says to make *all* graphics right-aligned.
>
>> and, because I am using a CSS:
>>
>> [Graphics]
>> GraphAlignAttributes = Yes
>
> That causes the align attribute to be issued despite use of CSS.
>
>> This aligns the "run-in" graphic as I want. But it also causes the
>> "below" graphic to appear to the right of the paragraph. (Without this
>> instruction present, it appears below the paragraph as expected.)
>
> Right, that's exactly what you told it to do.
>
>> The HTML output for the "run-in" graphic is something like:
>>
>> <p><img src="image.jpg" align="right">Paragraph text</p>
>>
>> The HTML output for the "below" graphic is something like:
>>
>> <p>Paragraph text</p><img src="image.jpg" align="right">
>>
>> The "below" graphic is set outside the <p>Paragraph text</p> element.
>> However, it is not in its own <p> element. This is true whether or not
>> the [GraphAlign] instruction is present, even if I explicitly set the
>> default:
>>
>> [Graphics]
>> GraphWrapPara = Yes
>
> That doesn't add a para, it retains an existing one if the
> graphic is by itself in that para. By default we remove those.
>
>> How can I achieve the effect I want?
>
> Undo all your .ini changes above <g>, and in your CSS add this:
>
> p img {float: right;}
>
> That should make any images inside <p> elements float to the
> right, while leaving those not in <p> elements alone.
>
> If that doesn't work, you'll need to use something other than
> "*" as the key in your [GraphAlign}, so that only the ones you
> want move right. Or assign a GraphClass to them in the anchored
> frame object properties, to distinguish the two situations. The
> GraphClass would enable a CSS solution, which is better. Note
> that you *cannot* use "text-align: right" because an <img> is
> not treated as a block element in CSS.
>
> You might repost this to the STC list; we're not list members.
>
> HTH!
>
> -- Jeremy H. Griffith, at Omni Systems Inc.
> <support at omsys.com> http://www.omsys.com/
>
>
More information about the framers
mailing list