Hi,
You have way too many divs for wrapping things in. All those title ,time, and price classes can simply be hooked on to your p tags. That saves three divs there alone.
You don’t have to set up that inner div for the left column either, just adjust the width and use paddings to do what the margins on the inner div was doing.
Vero, I am not any sort of graphic guru. For me, using Photoshop is like juggling vials of nitroglycerin. When I want to trim a graphic, I use a very simple, free tool called IrfanView. It has a relatively extensive toolbox, including a very easy way of resizing and cropping graphics. If you’re as ham-handed as I am with graphics, IrfanView might be something you find useful.
Hi,
No it won’t break the layout if the images are smaller but I would not go over 100px by 100px for your image sizes.
If you look at the code I posted above you will see that I set dimensions on the image via the css. That was just done to show the image without using an actual image.
img {/*for testing without actual images*/
display:block;
width:100px;
height:100px;
background:#444;
border:none;
}
However, on the live example I linked to there was an actual image being used and it was 75px by 75px. The css has stretched that image to 100px by 100px though. You could use max-width in place of the width though but it would not work in IE6.
By setting max-width/height it will scale the image according to the greatest value. For example, I just updated the link above with an image in the first div that is 375x500. It is setting the height at 100px and then scaling the width accordingly.
Be sure to target only the images in that parent div or you would be applying those rules to all images on your site.
You could target IE6 with an expression but be aware that they can be resource hogs. However, I would not be to concerned about it if I was just using one expression.
I would target the height, as long as your images were proportional it should be fine. If you had some images that were wider than they were tall then it could be a problem for IE6.
* html .imgwrap img { /* sets max-height for IE6 and scales the width accordingly */
height: expression( this.scrollHeight > 99 ? "100px" : "auto" );
}
@BlackMax: Thanks but the issue is not image resizing in a program, it’s code related. Irfanview is very good though!
Well I dropped it all into a containing div of 240px wide. I want the imgwrap divs to stack vertically. I had to remove the top and left margins of 20px and it works fine in Firefox. In IE6 if I have 5 imgwraps the 4th and 5th are all out of skew on text and titles, the content overflows the box vertically. Also there is a blue border around the image in IE6.
Any ideas?
I want the imgwrap divs to stack vertically. I had to remove the top and left margins of 20px and it works fine in Firefox. In IE6 if I have 5 imgwraps the 4th and 5th are all out of skew on text and titles, the content overflows the box vertically. Also there is a blue border around the image in IE6.
Hi,
I replied back to your PM. Here are the fixes to all the problems you mentioned.