IPrice minimart
powerfull & flexible online Store, price-lists and catalogs for Joomla
Welcome, Guest
Username: Password: Remember me

TOPIC: SmartResizer interferes with paragraph alignment

SmartResizer interferes with paragraph alignment 10 years 3 months ago #1060

  • Rene
  • Rene's Avatar
  • Offline
  • Новый участник
  • Posts: 1
  • Karma: 0
I noticed that justified paragraphs are left aligned when they contain a "smart resized" image. Here is an example:

HTML in Jooma editor:
<p style="text-align: justify;"><img style="margin: 7px; float: left;" src="images/eventgallery/Historische_Bilder/009_1958_02.jpg" alt="009 1958 02" />Um es kurz zu machen: einen tieferen Einstieg in den geschichtlichen Abriss über Wesen [...]</p>

What is sent to the browser after SmartResizer resized that image:
<p style="text-align: justify;"><a href="images/eventgallery/Historische_Bilder/009_1958_02.jpg" style="background:none;" onclick="return hs.expand(this)" ><img style="margin: 7px; float: left;" src="images/eventgallery/Historische_Bilder/smart_thumbs/009_1958_02_thumb_medium400_0.jpg" alt="009 1958 02" /></a>
<div class="highslide-caption">009 1958 02</div>Um es kurz zu machen: einen [...]</p>


The problem is the div within the p-tag which is not allowed and causes browsers to automatically close the p-tag. A span-tag for example would work with an p-tag. I changed this in smartreszier.php line 614 and now it is working for me.

Just wanted to let you know in case you want to change it for the official version, too, as most if not all pictures will be within a paragraph.
Last Edit: 10 years 3 months ago by Rene. Reason: highlited some text
Login or register to post message.

SmartResizer interferes with paragraph alignment 10 years 3 months ago #1084

  • support
  • support's Avatar
  • Offline
  • Администратор
  • Posts: 1905
  • Thank you received: 311
  • Karma: 59
Yes, it is true, when you use function of display caption bellow image. You can configure your MCE Editor to add <br/> tag instead of <p> tag when new line added. It will resolve the problem. Also I will test your solution with <span> tag for all modes of SmartResizer and will include it to the new version if it will be no conflict with other functions of smartresizer (such as displaying of caption bellow thumbnail and etc).
Last Edit: 10 years 3 months ago by support.
Login or register to post message.
Moderators: support

Subscribe



Subscribe to our newsletter and social networks to be updated with the latest updates.

Login