Image caption not centered on image in H&M 5.5.1

Please post all new bug reports for Help & Manual 5 here.
Post Reply
User avatar
DocWriter
Posts: 6
Joined: Wed Jan 27, 2010 10:56 am
Location: Brussels
Contact:

Image caption not centered on image in H&M 5.5.1

Unread post by DocWriter »

Hello!

I installed the new release this morning, and after compiling one of my help projects to Webhelp, I realized that image captions were no longer centered according to the width of the image, but to the page width.
As a result, on large screens the image caption is completely shifted to the right of the image...

It really seems related to the 5.5.1 version build 1295, I checked the previous compilation and the image captions looked fine.

What can I do?

Thanks in advance for your help,

Cecile Thiran
Efficy SA/NV
redseujac
Posts: 23
Joined: Sat Dec 13, 2008 6:32 pm

Re: Image caption not centered on image in H&M 5.5.1

Unread post by redseujac »

Confirmed here.

This issue is already present since version 5.5.0 build 1273 this was the first build of version 5.

It's very annoying and I have tried everything, unfortunately without any success.

I had to go back to version 5.4.0 build 1201.

I hope this can be fixed very soon.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Image caption not centered on image in H&M 5.5.1

Unread post by Tim Green »

There has actually been a change to correct the handling of image caption centering. It looks as though the captions on your pages are formatted in a way that was not considered in the change. We'd like to check and fix this right away but we need to see an example. Please mail a small demo project to support AT ec-software.com (replace the AT with @) and include information on the browsers where it works/doesn't work. (These things will often be very different in different browsers.)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Image caption not centered on image in H&M 5.5.1

Unread post by Martin Wynne »

Tim Green wrote:It looks as though the captions on your pages are formatted in a way that was not considered in the change.
Hi Tim,

No, it's a simple bug. Caption centering works only if the image is centred on the page. When the image is left-aligned on the page, the essential width attribute (but without auto margin) is missing from the inner div:

Image centred:
<div style="text-align: center;"><div style="margin: 0pt auto; width:269px; padding: 0px;"><img height="60" width="269" border="0" alt="test caption" src="test.png"><p style="text-align: center;"><span class="f_ImageCaption">test caption</span></p></div></div>

Image left-aligned:
<div><div><img height="60" width="269" border="0" alt="test caption" src="test.png"><p style="text-align: center;"><span class="f_ImageCaption">test caption</span></p></div></div>

There doesn't seem to be an easy fix. Putting the image in a single-cell table cures it, but that is a lot of work. A quick fix which does much the same thing is to bullet the image, but that looks a bit messy.

regards,

Martin.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Image caption not centered on image in H&M 5.5.1

Unread post by Tim Green »

Hi Martin,

You're right but the fix is actually quite simple. The focus was so much on (finally) getting it to work in right-justified and centered images that the normal left-justified ones got left by the wayside... :roll:

Right-justified currently looks like this:

<div style="text-align: right;"><div style="margin:0 0 0 auto;width:100px;padding:0px"><img src="efficysquareonwhite100px.jpg" width="100" height="100" border="0" alt="This is our company logo"><p style="text-align:center"><span class="f_ImageCaption">This is our company logo</span></p></div></div>

For left-justified all that is needed is this:

<div><div style="margin:0 auto 0 0;width:100px;padding:0px"><img src="efficysquareonwhite100px.jpg" width="100" height="100" border="0" alt="This is our company logo"><p style="text-align:center"><span class="f_ImageCaption">This is our company logo</span></p></div></div>

In addition to removing the right-align from the first div, all that is necessary is the adjustment of the margin settings for the second div. We're currently testing this for potential problems, but it looks OK at the moment. :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Image caption not centered on image in H&M 5.5.1

Unread post by Tim Green »

Update: The fix is already online as build 1296 at http://www.ec-software.com/downloads.html
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
redseujac
Posts: 23
Joined: Sat Dec 13, 2008 6:32 pm

Re: Image caption not centered on image in H&M 5.5.1

Unread post by redseujac »

Thank you guys for this quick fix. I'll test it right now.

Edit: installed the update, tested and the results seem to be OK now. Thanks again.

Notice: my help project concerns a HTML Help (.chm) file and NOT a Webhelp.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Image caption not centered on image in H&M 5.5.1

Unread post by Martin Wynne »

Tim Green wrote:Update: The fix is already online as build 1296 at http://www.ec-software.com/downloads.html
Thanks Tim.

Amazing service from EC Software. :)
Post Reply