rmagnes
09-19-2007, 01:10 PM
I'm trying to build a php based photo gallery and IE seems to be getting confused with my div order and links. This is pretty difficult to explain, but basically when a user roles over a thumbnail image in Firefox, it links to the larger image. However, when a user trys this in IE, the image does not link to the larger image; only the border space created by the parent div is clickable. I know this is difficult to visualize, so take a look for yourself:
http://wakaorphanage.org/photos.php
Try that link in Firefox first to see how the script is supposed to work and then take a look at it in IE. See how you can't click on the image in the middle of each thumbnail box in IE? That's not intentional.
Here is the PHP script that runs the thumbnail boxs:
// display thumbnails in unordered list format
echo "
<div id='imgright'><div id='sthumb-box2'><h";
echo $header+1;
echo "";
echo $header+1;
echo "><ul>";
for ($i = 0; $i <= $result; $i++){
if(is_file($path.'/'.$photo[$i])) {
$alt = $image[$i][2];
echo "
<li><div id='stretchbox'><a href='?a=$i'><div id='squareit'><img src='$path/$photo[$i]' alt='$alt' border= 0 /></div></a></div></li></span>
";
}
}
echo "
</ul></div></div>";
1.Div imgright is used to align all of the thumbnails next to the main image display
2.Div sthumb-box2 is used to create that niffty little grey border that lights up when a user rolls over the thumbnail.
3.Div stretchbox is an IE hack, which I designed to evenly space out all of the thumbnails.
4.Div squareit was designed to cut the thumbnail images down to a perfect square without distorting them. I did this so that I did not have to cut each thumbnail down individually in photoshop. Theoretically, it was supposed to make my life easier!
Ok and here is the corresponding style sheet info:
#stretchbox {
min-width: 110.5px;
min-height: 110.5px;
padding-right: 10.5px;
padding-bottom: 10.5px;
}
#sthumb-box2 ul {
margin: 0;
padding: 0;
list-style-type: none;
}
#sthumb-box2 li {
margin-right:0px;
float:left;
}
#sthumb-box2 a {
outline: none;
display:block;
height:100px;
width:100px;
padding-top:9px;
padding-left:9px;
border:#CCCCCC 1px solid;
float:left;
text-decoration: none;
overflow: hidden;
}
#sthumb-box2 a:hover {
border:#999999 1px solid;
overflow: hidden;
}
#squareit {
width:90px;
overflow: hidden;
margin-right:5px;
display: block;
}
Give me your thoughts, I am willing to give anything a shot.
http://wakaorphanage.org/photos.php
Try that link in Firefox first to see how the script is supposed to work and then take a look at it in IE. See how you can't click on the image in the middle of each thumbnail box in IE? That's not intentional.
Here is the PHP script that runs the thumbnail boxs:
// display thumbnails in unordered list format
echo "
<div id='imgright'><div id='sthumb-box2'><h";
echo $header+1;
echo "";
echo $header+1;
echo "><ul>";
for ($i = 0; $i <= $result; $i++){
if(is_file($path.'/'.$photo[$i])) {
$alt = $image[$i][2];
echo "
<li><div id='stretchbox'><a href='?a=$i'><div id='squareit'><img src='$path/$photo[$i]' alt='$alt' border= 0 /></div></a></div></li></span>
";
}
}
echo "
</ul></div></div>";
1.Div imgright is used to align all of the thumbnails next to the main image display
2.Div sthumb-box2 is used to create that niffty little grey border that lights up when a user rolls over the thumbnail.
3.Div stretchbox is an IE hack, which I designed to evenly space out all of the thumbnails.
4.Div squareit was designed to cut the thumbnail images down to a perfect square without distorting them. I did this so that I did not have to cut each thumbnail down individually in photoshop. Theoretically, it was supposed to make my life easier!
Ok and here is the corresponding style sheet info:
#stretchbox {
min-width: 110.5px;
min-height: 110.5px;
padding-right: 10.5px;
padding-bottom: 10.5px;
}
#sthumb-box2 ul {
margin: 0;
padding: 0;
list-style-type: none;
}
#sthumb-box2 li {
margin-right:0px;
float:left;
}
#sthumb-box2 a {
outline: none;
display:block;
height:100px;
width:100px;
padding-top:9px;
padding-left:9px;
border:#CCCCCC 1px solid;
float:left;
text-decoration: none;
overflow: hidden;
}
#sthumb-box2 a:hover {
border:#999999 1px solid;
overflow: hidden;
}
#squareit {
width:90px;
overflow: hidden;
margin-right:5px;
display: block;
}
Give me your thoughts, I am willing to give anything a shot.