I’m having a bit of trouble identifying what the problem is when trying to get my row of images to be as large as possible, without overlapping.
The code below gives me this:
Category 1:
Category 2:
What I wanted is to get rid of the white area around the image so the hover border looks like its around the edge of the image itself, and make the images fit in the available space.
I thought I had figured it out, by increasing image_ratio='150'; to image_ratio='200';
still had a bit of a border, but it was close enough for me to be happy with
But on my category 2 the images completely overlap -
Is it possible because my source images in category 2 are not square originally?
Am I changing the wrong variable?
Is there a better way to get rid of the border and have the three images fit?
If I wanted to put two categories per line and make the images fit in the space what would I need to change?
I’m afraid that the above code does not help. It seems to my that it is used by a JavaScript plugin to build your gallery and it is useless on it’s own. You will have to make a JSFiddle or something.
Sounds like a CSS issue, but we need to see a working demo. You could extract the relevant code and put it up somewhere—as suggested—such as on CodePen. Or just provide a link.
I’m using a test version that isn’t live, I’ve also attempted to put it in a codeine, but it comes out a jumble probably because of the way it integrates with the ecommerce system.
Here are links anyways - not sure which one works so have them all
He’s asking for the origina HTML and CSS. What we see there is the rendered HTMl and CSS and maybe it is enough but it would be great to have the source.
Is it because each section has it’s own HTML & CSS inside, rather than a master HTML and Master CSS file?
This is in the entire code within the category section:
We still need to see a working demo. If you can create a working page, starts with doctype, ends with </html>, we can work with that. You can probably substitute your images with placeholders. Example: http://placehold.it/200x200
For gaps coming on left & right sides, please do cross check if images themselves contains a blank space. Sometimes designers put blank space on either side of image to make the object center aligned.
We still need to see a working demo. If you can create a working page, starts with doctype, ends with , we can work with that. You can probably substitute your images with placeholders.
I don’t think a working demo is possible unfortunately, thats just because of the web based software that is used, even when trying to sub in placeholder images
For gaps coming on left & right sides, please do cross check if images themselves contains a blank space. Sometimes designers put blank space on either side of image to make the object center aligned.
I’ve double checked the images, and there isn’t any white space - I’ve even made sure they’re square too.
What browser are you using? Are you familiar with the developer’s tools in that browser? If not, it would probably be very easy to find the source of the problem if you would take a few minutes (less than an hour) to become accustomed to your dev tools.
I use Firefox browser and the Firebug plugin for most of my troubleshooting. By hovering over a tag, one can see the padding and margin around it in distinct colors. The CSS is shown in a separate section and can be changed temporarily to test possibilities.
Teaching yourself how to use a dev tool would be faster and more productive than asking us to guess about possible causes without us being able to see the bigger picture.
I have attempted to have a look around the developer software and have update the JSFiddle - It is hard to put code for the whole thing, so I have attempted to take the relevant information out, but let me know if that isn’t enough:
I have added images from the inspector as well, because I can’t fully get a working page like it appears because this is within a ‘test shop’ so I cannot get a live preview. Hopefully that might give more insight.
Hi, this is a longshot. I’m only guessing, but if you change the image_ratio=‘200’ in the categories-container class, shouldn’t it also be changed to 200 in the products-container class? Probably the image resizing is somehow linked and if you change one class parameters maybe it is necessary to also change the other.