My website displayed exactly as I wanted it to in all versions of all browsers that I tested it with. Until I downloaded IE8. And IE8 doesn't display the photo gallery correctly.
Taking
http://www.jrosworld.com/gallery/can...ery_index.html as an example page, what should be displayed, is a photo gallery where photos are displayed in rows of 3. In IE8, the photo gallery only displays in rows of 2.
So I thought that the easiest thing to do, would be to reduce the size of the photos so that they are small enough that IE8 displays them in rows of 3 as well. But the problem in doing that, is that firefox then shifts the photos around and it doesn't display correctly there anymore. And I'm pulling my hair out, because I cannot figure out what it is, that is making Firefox act like this. And also, why the f**k couldn't IE8 just act like IE7? It worked there.
This is the relevant part of the style sheet as it currently is.
Code:
div.photo {
margin-left:4%;
margin-right:4%;
border-style:none;
display:inline;
}
div.photo img {
margin-top:25px;
max-width:25.3%;
min-width:25.3%;
border-width:1px;
border-style:solid;
border-color:#0044AA;
vertical-align:middle;
}
Altering this code to
Code:
div.photo {
margin-left:4%;
margin-right:4%;
border-style:none;
display:inline;
}
div.photo img {
margin-top:25px;
max-width:24.7%;
min-width:24.7%;
border-width:1px;
border-style:solid;
border-color:#0044AA;
vertical-align:middle;
}
and the gallery displays correctly in IE8, but not in Firefox.
Altering the code to
Code:
div.photo {
margin-left:4%;
margin-right:4%;
border-style:none;
display:inline;
}
div.photo img {
margin-top:25px;
max-width:24.8%;
min-width:24.8%;
border-width:1px;
border-style:solid;
border-color:#0044AA;
vertical-align:middle;
}
and the gallery displays correctly in Firefox, but not IE8.
And I've tested altering the min/max img width to something like 10 decimal places. There is no point that it works in both.
Similarly, I can alter this code to
Code:
div.photo {
margin-left:3.7%;
margin-right:3.7%;
border-style:none;
display:inline;
}
div.photo img {
margin-top:25px;
max-width:25.3%;
min-width:25.3%;
border-width:1px;
border-style:solid;
border-color:#0044AA;
vertical-align:middle;
}
then it displays perfectly in IE8, but not in Firefox.
But if I alter it to
Code:
div.photo {
margin-left:3.8%;
margin-right:3.8%;
border-style:none;
display:inline;
}
div.photo img {
margin-top:25px;
max-width:25.3%;
min-width:25.3%;
border-width:1px;
border-style:solid;
border-color:#0044AA;
vertical-align:middle;
}
then it displays perfectly in Firefox, but not in IE8.
If anyone can help me figure out, either what I can add to this code to make it work in both IE8 and Firefox, or what the problem is with either IE8 or Firefox, so I can fix it so that it works in both browsers, I'll be so greatful. Because this is really making me pull my hair out. I am totally stumped.