Large images appearing in wrong position
Permalink Browser Info EnvironmentI tried reordering the images in the fileset, but that did not change their order in the gallery. I was trying to see if it was the specific image that triggered the problem, or the fact that it was the 9th. So I deleted the 9th image so that a different image was now the 9th. The problem still happened at the 9th image.
I am using a full-width page template which has a "page" DIV that is 960px wide. I've tried various options for the images per page setting - no help. The problem still occurs at the 9th image.
I then removed all images from the fileset and added them back one by one. The problem occurred on an image that was uploaded at 600 x 421px in size. I tried deleting it, resizing it down to 570x400 (so it wouldn't need downsizing to display full size) and uploading it again. The problem still happened on that image! I'm totally bemused, hence this enquiry. What on earth is going on here?
Type: | Discussion |
---|---|
Status: | New |
1. 300 x 450
2. 470 x 600
3. 600 x 603
4. 500 x 333
5. 600 x 600
6. 500 x 293
7. 600 x 410
All of these display correctly except no. 7, which fits your advised criteria. Nos. 4 and 6 are smaller than you advise, but they do display correctly. So I'm even more confused. I wondered if perhaps an image could cause a problem for the following one, so I removed image 6. But Image 7 (now image 6) still displayed in the wrong place. I have tried exiting edit mode and viewing the page normally, but no difference. I'm using the Chrome browser.
I'm disappointed with this - I never thought I'd have to be fiddling at this level.
The other 2 factors it could be:
1) The image may be corrupted or not uploaded completely. I've seen this occur before. Simply deleting the image from the file manager and re-uploading it can do the trick. Otherwise if the original file had problems, you can try replacing it with a completely alternative image with the same dimensions and see if that's it.
2) When the images are resized, they are cached in the "/files" folder at the top level of your C5 installation on your server. This is done for performance reasons so the gallery will load as fast as possible. So removing an image and adding the same one (without deleting it from the file manager) won't re-generate the cached copy. That's why deleting and re-uploading the particular image is the better way to go.
Try those and let me know how you go.
JB
One other observation: if I use the Chrome developer tools and examine the page structure, the DIV (or SPAN) that is the image container is not 600px wide - it's about 585. Does that sound right? I can't verify the exact details of this right now, as my web host seems to have just gone down.
1. the SPAN with "class=image-wrapperg currentg" is only 525px wide - should it not be 600?
2. The image (incorrectly displaying below the span) has been rendered to the browser at 587x402px. As uploaded, it was 600x410.
Is it possible that there is some subtle issue with my theme, and the page structure is not quite right? I made up the theme myself some time back. It does seem to work OK, but it was done when I was very new to C5 (still am really, but have pretty much decided to adopt it for our new website).
The website is athttp://www.marshallarts.com.au. Because it is a new website under construction, the index.php is sometimes switched to just immediately redirect to our old website athttp://www.westnet.net.au - if that happens you won't see a C5 website. Go to "Galleries", then "Award Winners - Steve". The last image is the one with the problem.
Thanks for staying with this - I really want to like this gallery, because it has just the right level of "fancyness" for my taste.
Cheers
Steve
Yes, it seems the width of the last image is too wide and throwing out the layout. The resizing should take care of that but for some reason that image is much larger than the others.
You could try adding the following CSS to your site theme:
.contentg .advance-linkg{max-width:519px;height:auto;}
This will force the width via CSS without losing the image perspective.
Try that out and let me know how it goes.
JB
.contentg .advance-linkg img{max-width:519px;height:auto;}
So, where is the actual problem here? Is the width of that SPAN calculated and set somewhere in the javascript, or is it a best-fit into the surrounding page structure? Maybe a bit of both. If it's the former, is it a bug that could/should be fixed? Or if the latter, maybe my theme does need some tweaking so that contained content is not squeezed.
Either way, it seems to me that the image resizing is being done assuming that the space available is 600px wide, instead of basing it on what the space actually is.
Anyway, many thanks for the help with this. I will probably do a bit more investigation re my theme, but for the moment I have a working solution, even if the images are a bit smaller than I would like :-D .
The original implementation of this block forced the resizing and cropping. Later we added the non-cropping block templates based on customer requests. So it's trying to cater to look good on a wide range of templates and different page layouts.
Just ensure you keep a backup copy of the package if you ever upgrade it.
Hope this helps.
JB
Like some others, I'd like the large images to be centred horizontally in the available space, and it seems to me that containing the IMG in a DIV might make that a bit easier. I know I could just try changing the SPAN to a DIV, but I thought I'd ask the question first. Of course, if there is a simpler way to centre the images horizontally, I'd be happy to know it. (I have searched for that, but didn't seem to get anywhere.)
Hope this helps.
JB
Hope this helps.
JB