Support Forum

  • Page:
  • 1

Lazy Load image-text overlapping

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi guys,

thanks for this wonderful plugin, but there is one problem.
Since the image loads after scrolling down the page, the left aligned images are showing over the text.
You could see this bug even in your blog.

I'm attaching screenshot of the problem.

Hope there will be some kind of fix for this :)

Regards,
Yuriy
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
Last Edit: 13 years 9 months ago by Trimud.
The administrator has disabled public write access.
Hi there Yuriy,

That was actually a bug in my css that I sorted a few days ago.

Can you point to where its happening for you?

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Hi Anthony,

thanks for the quick replay.

You could take a look here for example: k2.webcreato.com/index.php
Text is over the images and images captions are not long enough.

Also the screenshot from the previous post is still actual on every single K2 page on this site :)

Best Regards,
Yuriy
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
Last Edit: 13 years 9 months ago by Trimud.
The administrator has disabled public write access.
For the errors on the JB site is it only in firefox and does it disappear if you click refresh? I just saw it and then refreshed and it had gone so I wonder if its a cache issue.

I cant actually see it happening on your site at the moment.

Can you perhaps post a screenshot of it on your site?

Thanks Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Yes, I'm attaching the screenshot.

If you are on the same row when reloading the page the image will show up correctly, because the script doesn't start.
But if you are in the beginning of the page and scroll down you will see the problem.
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Yuri,

Not sure of a fix for this but it seems to be occurring because the div (div.image_caption) wrapping the image has an explicit width which comes from the caption and it is a lot smaller than the image.
Maybe if changing the markup around by pulling the image outside and floating it, or being able to increase the width there might help.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Hi Jason,

the problem comes after installing the plugin.
I know that caption.js gives width of the images, but since the image doesn't load initially, before the caption.js is loaded it breaks the width of div.caption.

There is no problem if the image or the surrounding div is not left aligned (or floated) or if there is a clearing element before the text. Something like that:

Broken:
<img src="" align="left" />Text text text

Working solution:
<img src="" align="left" /><br />
Text text text

I know this shouldn't be like that and maybe there is a way to catch the real width and all paddings and margins of the image before it loads when I scroll down.

Regards,
Yuriy
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
Last Edit: 13 years 9 months ago by Trimud.
The administrator has disabled public write access.
Ah I think I see whats happening here now.

I think you need to specify the height and width for the image via an inline style. If you use JCE it does this for you anyway and its certainly recommended from an accessibility and seo point of view.

Let us know if that fixes it.

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Sure,

I can do this and it works fine.

In the default T3 joomlart installation there is no width of the pictures, that's why I saw the problem.

Of course I will spend more time investigating the problem on my next project to see if it broke on some other place.
BTW: The user section here: k2.webcreato.com/index.php?option=com_k2&view=item&id=49:joomladay-hungary-2009 works fine unlikely your blog posts as I mentioned in the first post.

Thanks for the great support.
Yuriy
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
Last Edit: 13 years 9 months ago by Trimud.
The administrator has disabled public write access.
Cool - just to confirm are you still seeing it on the blog? I cant replicate here now :)

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
No, the bug still stands.
See attached screenshot. It is when I scroll down and the image is not yet loaded.

This bug is only reproducible in Firefox 3.5.10 and 3.6.6 with small differences.

Chrome, Opera, Safari, IE7, even IE6 is ok :)
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
Last Edit: 13 years 9 months ago by Trimud.
The administrator has disabled public write access.
Ah ok - I think its the same issue. I just specified the width and height in the k2 template.

Still cant seem to replicate it here but I think its fixed now anyway.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Well, not really fixed, but it is not a big deal after all :)

Of course, you can play a little bit with float: left and clear: both on some elements but only if You are able to see the bug ;)
  • Trimud's Avatar
  • Trimud
  • Free Extensions
  • 7 posts
  • Karma: 0
The administrator has disabled public write access.
Hehe that would help.

Ill do some more investigating but as you say its a small thing.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers