Timbalu wrote:But as we already stated here, this is not the best solution, since it breaks the image floats. I imagine the only other way to make this run, is to tweak the lightbox js files inside, since the lightbox2 script must have that solved too (inside!) somehow.
I assume that it would be easier if we had different markup and styles for including images from the media db, especially for galleries (we actually don't have true support for image galleries as it is, they're just a bunch of images next to each other; also users may have to add a container div manually to clear their floats, depending on the theme).
For example, floated images currently are img elements with a class, potentially surrounded by a link – unless the image has a caption. In that case, they're included in some div soup. The image is floated, the a element is not. If there's a caption, the container div is floated as well (also to make it possible to center images).
All that is very weird and probably prone to error at some point. Also, HTML5 now offers way better markup for images with captions – using figure and figcaption.
It isn't a short-term solution for the issue at hand, but it is worth keeping in mind for 2.1 or something.