Schmoopy
09-11-2008, 12:17 PM
Hi there, I recently started work on my dad's website and after doing most of it I decided to use the image gallery from the website http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/
I managed to sort it all out in firefox, but as per usual, internet explorer didn't want to know :(. Here is the source code for it (including CSS):
<head>
<style type="text/css">
.gallerycontainer{
position: relative;
top:380px;
left:230px;
/*Add a height attribute and set to largest image's height to prevent overlaying*/
}
.thumbnail img{
border: 1px solid white;
margin: 0 5px 5px 0;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
padding: 0px;
left: -1000px;
visibility: hidden;
color:#0066cc;
text-decoration: none;
text-align:center;
font-size:12pt;
white-space:nowrap;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image*/
visibility: visible;
top: 0px;
left:280px; /*position where enlarged image should offset horizontally */
z-index: 50;
}
</style>
</head>
Here is the html body code:
<div class="gallerycontainer">
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test1.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test1.jpg"</span></a>
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test2.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test2.jpg"</span></a>
<br/>
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test3.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test3.jpg"</span></a>
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test4.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test4.jpg"</span></a>
</div>
<div style="position:absolute; top:550px; left:230px; width:200px; font-size:14pt; color:#0066cc">
Roll over the images to view them.
</div>
Hope you can sort out my problem - in internet explorer only the first "test1.jpg" image shows up and the rest aren't there, also the "Roll over the images to view them" text does not show up either =/.
Thanks in advance,
Jack
I managed to sort it all out in firefox, but as per usual, internet explorer didn't want to know :(. Here is the source code for it (including CSS):
<head>
<style type="text/css">
.gallerycontainer{
position: relative;
top:380px;
left:230px;
/*Add a height attribute and set to largest image's height to prevent overlaying*/
}
.thumbnail img{
border: 1px solid white;
margin: 0 5px 5px 0;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
padding: 0px;
left: -1000px;
visibility: hidden;
color:#0066cc;
text-decoration: none;
text-align:center;
font-size:12pt;
white-space:nowrap;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image*/
visibility: visible;
top: 0px;
left:280px; /*position where enlarged image should offset horizontally */
z-index: 50;
}
</style>
</head>
Here is the html body code:
<div class="gallerycontainer">
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test1.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test1.jpg"</span></a>
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test2.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test2.jpg"</span></a>
<br/>
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test3.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test3.jpg"</span></a>
<a class="thumbnail" href="#thumb"><img src="tabs/narrowboatboxes/test4.jpg" width="100px" height="66px" border="0" style="opacity:0.4; filter:alpha(opacity=40)"
onmouseOver="this.style.opacity=1; this.filters.alpha.opacity=100"
onmouseOut="this.style.opacity=0.4; this.filters.alpha.opacity=40"/>
<span><img src="tabs/narrowboatboxes/test4.jpg"</span></a>
</div>
<div style="position:absolute; top:550px; left:230px; width:200px; font-size:14pt; color:#0066cc">
Roll over the images to view them.
</div>
Hope you can sort out my problem - in internet explorer only the first "test1.jpg" image shows up and the rest aren't there, also the "Roll over the images to view them" text does not show up either =/.
Thanks in advance,
Jack