Left align image caption
Moderators: Alexander Halser, Tim Green
Left align image caption
Hi there,
is there a way to left-align the image caption? Whatever I try, it always is centered below the image.
Best regards,
George
is there a way to left-align the image caption? Whatever I try, it always is centered below the image.
Best regards,
George
- Alexander Halser
- EC-Software Support
- Posts: 4105
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Left align image caption
No sorry. Image captions are always centered below the image.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
Re: Left align image caption
Thank you Alexander. I kindly request then that this feature is being considered as an enhancement for the next release.
Best regards,
George
Best regards,
George
Re: Left align image caption
Hi Alexander,
can you confirm that this change request has been registered on your side?
As far as I can tell you are embedding the caption into a center-aligned < p > tag. I suggest to offer left/center/right alignment in the image properties dialog.
Best regards
George
can you confirm that this change request has been registered on your side?
As far as I can tell you are embedding the caption into a center-aligned < p > tag. I suggest to offer left/center/right alignment in the image properties dialog.
Best regards
George
-
- Posts: 37
- Joined: Wed Feb 03, 2010 11:19 am
Re: Left align image caption
Can I just ask if anything was done to be able to do this? I would like to be able to set the captions under images to be left aligned.
Regards
Andy
Andy
- Tim Green
- Site Admin
- Posts: 23183
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Left align image caption
The built-in image caption is centered and that cannot be changed because the image caption style does not have any editable paragraph attributes. This is for technical reasons, because manually changing the paragraph alignment within the image HTML generated by HM would then require additional changes.Andy121070 wrote:Can I just ask if anything was done to be able to do this? I would like to be able to set the captions under images to be left aligned.
The only way to do this is to not use the integrated image caption. Instead, put the image in a single-cell table with a paragraph beneath it for your caption and then set that paragraph to be left-aligned.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 37
- Joined: Wed Feb 03, 2010 11:19 am
Re: Left align image caption
Thank you for your response Tim.
When I look at the htm file for one of the compiled topic pages, I see the following line..
Looking at this bit specifically
if I change this to text-align:left, I get the result that I am looking for. Is this not the setting that needs to be adjusted to allow for the alignment of the image caption?
When I look at the htm file for one of the compiled topic pages, I see the following line..
Code: Select all
<div><div style="width:596px;padding:0px"><img src="ca_view_zoom80.png" width="596" height="408" style="border:none" alt="Cleaning Area View" title="Cleaning Area View" /><p style="text-align:center"><span class="f_ImageCaption" style="font-size: 10pt;">Cleaning Area View</span></p></div></div>
Code: Select all
<p style="text-align:center">
Regards
Andy
Andy
- Tim Green
- Site Admin
- Posts: 23183
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Left align image caption
Hi Andy,
That's correct but it won't help you, because you can't currently make that change from within Help & Manual. You would have to manually edit the HTML every time you publish.
That's correct but it won't help you, because you can't currently make that change from within Help & Manual. You would have to manually edit the HTML every time you publish.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 37
- Joined: Wed Feb 03, 2010 11:19 am
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Left align image caption
Hi Andy,Andy121070 wrote:Can I just ask if anything was done to be able to do this? I would like to be able to set the captions under images to be left aligned.
You can get what you want if you add some scripting to the HTML topic template (in the skin, if you are using one). Immediately above the </body> tag at the bottom of the template insert this:
Code: Select all
<script>
var img_cap;
var img_caps_list = document.getElementsByClassName('f_ImageCaption');
for(img_cap=0; img_cap<img_caps_list.length; img_cap++)
{ img_caps_list[img_cap].parentNode.style.textAlign="left"; }
</script>
It relies on the existing code from H&M where the class is on a <span> inside an unclassed (Normal) <p> having an inline text-align style. If Alexander changes that in a future upgrade, the above will stop working and may produce strange results.
Just to repeat -- the change is made in the skin. That catches me out so many times.
regards,
Martin.
- Tim Green
- Site Admin
- Posts: 23183
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Left align image caption
Hi Martin,
We know, and we'd really like to make this more intuitive but it's a very difficult thing to do. The optimum would be to grey out all relevant sections in the project if a skin is activated. That's not possible though, because you can use different skins, or no skins, for different builds of the same project. The only real option is to no longer have these sections in the project at all -- i.e. everything only in a skin, with a default skin serving for the current integrated stuff. That's a major change with it's own stumbling blocks, but we're considering it.Just to repeat -- the change is made in the skin. That catches me out so many times.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.