halfalime
11-16-2010, 06:49 AM
Hi all,
Been working on a real simple crappy website with a gallery to sell photos.
Works in all browsers except IE where is shows the first photo in the right place then the rest below it down the page with a large gap between them.
Could someone have a look at the code below and see if they can work out why it screws out in IE.
HTML
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>South Pacific Youth Leadership Convention - Photographs - Choir</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/stylechoir.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
</head>
<body >
<div id="album" style="height: 430px;">
<a href="gallery/choir/communitychoir.jpg" rel="lightbox" title="C01"><img src="gallery/choir/communitychoirthumb.jpg" class="img1" alt="Community Choir" /></a>
<p class="label1">C01</p>
<a href="gallery/choir/fullchoir1.jpg" rel="lightbox" title="C02"><img src="gallery/choir/fullchoir1thumb.jpg" class="img2" alt="Full Choir" /></a>
<p class="label2">C02</p>
<a href="gallery/choir/jamesandstudents.jpg" rel="lightbox" title="C03"><img src="gallery/choir/jamesandstudentsthumb.jpg" class="img3" alt="James and Students" /></a>
<p class="label3">C03</p>
<a href="gallery/choir/jamesdirecting.jpg" rel="lightbox" title="C04"><img src="gallery/choir/jamesdirecting.jpg" class="img4" alt="James directing" /></a>
<p class="label4">C04</p>
<a href="gallery/choir/studentchoir1.jpg" rel="lightbox" title="C05"><img src="gallery/choir/studentchoir1thumb.jpg" class="img5" alt="Student Choir" /></a>
<p class="label5">C05</p>
</div>
<div class="footer">
<p class="pgbuttons">1</p>
<p class="bttns"><a href="index.html">HOME</a></p>
</div>
</body>
</html>
CSS
.pgbuttons{
position: absolute;
top: 10px;
left: 410px;
font: 15px Verdana, sans-serif;
}
.bttns{
position: absolute;
top: 10px;
font: 15px Verdana, sans-serif;
}
#album a{
display:block;
float:left;
width:160px;
height:180px;
line-height:180px;
overflow:hidden;
position:relative;
z-index:1;
margin: 5px 5px 20px 5px;
}
#album a img.img1{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img2{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img3{
float:left;
position:absolute;
top:-10px;
left:-10px;
}
#album a img.img4{
float:left;
position:absolute;
top:-60px;
left:-250px;
}
#album a img.img5{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img6{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img7{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img8{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img9{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img10{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img11{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img12{
float:left;
position:absolute;
top:-10px;
left:-70px;
}
#album a img.img13{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img14{
float:left;
position:absolute;
top:-50px;
left:-500px;
}
LIGHTBOX
#lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
#lightbox img{ width: auto; height: auto;}
#lightbox a img{ border: none; }
#outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
#imageContainer{ padding: 10px; }
#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}
#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; }
#imageData{ padding:0 10px; color: #666; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
#imageData #caption{ font-weight: bold; }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;}
#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }
Many thanks in advance,
Josh
Been working on a real simple crappy website with a gallery to sell photos.
Works in all browsers except IE where is shows the first photo in the right place then the rest below it down the page with a large gap between them.
Could someone have a look at the code below and see if they can work out why it screws out in IE.
HTML
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>South Pacific Youth Leadership Convention - Photographs - Choir</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/stylechoir.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
</head>
<body >
<div id="album" style="height: 430px;">
<a href="gallery/choir/communitychoir.jpg" rel="lightbox" title="C01"><img src="gallery/choir/communitychoirthumb.jpg" class="img1" alt="Community Choir" /></a>
<p class="label1">C01</p>
<a href="gallery/choir/fullchoir1.jpg" rel="lightbox" title="C02"><img src="gallery/choir/fullchoir1thumb.jpg" class="img2" alt="Full Choir" /></a>
<p class="label2">C02</p>
<a href="gallery/choir/jamesandstudents.jpg" rel="lightbox" title="C03"><img src="gallery/choir/jamesandstudentsthumb.jpg" class="img3" alt="James and Students" /></a>
<p class="label3">C03</p>
<a href="gallery/choir/jamesdirecting.jpg" rel="lightbox" title="C04"><img src="gallery/choir/jamesdirecting.jpg" class="img4" alt="James directing" /></a>
<p class="label4">C04</p>
<a href="gallery/choir/studentchoir1.jpg" rel="lightbox" title="C05"><img src="gallery/choir/studentchoir1thumb.jpg" class="img5" alt="Student Choir" /></a>
<p class="label5">C05</p>
</div>
<div class="footer">
<p class="pgbuttons">1</p>
<p class="bttns"><a href="index.html">HOME</a></p>
</div>
</body>
</html>
CSS
.pgbuttons{
position: absolute;
top: 10px;
left: 410px;
font: 15px Verdana, sans-serif;
}
.bttns{
position: absolute;
top: 10px;
font: 15px Verdana, sans-serif;
}
#album a{
display:block;
float:left;
width:160px;
height:180px;
line-height:180px;
overflow:hidden;
position:relative;
z-index:1;
margin: 5px 5px 20px 5px;
}
#album a img.img1{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img2{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img3{
float:left;
position:absolute;
top:-10px;
left:-10px;
}
#album a img.img4{
float:left;
position:absolute;
top:-60px;
left:-250px;
}
#album a img.img5{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img6{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img7{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img8{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img9{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img10{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img11{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img12{
float:left;
position:absolute;
top:-10px;
left:-70px;
}
#album a img.img13{
float:left;
position:absolute;
top:-10px;
left:-80px;
}
#album a img.img14{
float:left;
position:absolute;
top:-50px;
left:-500px;
}
LIGHTBOX
#lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
#lightbox img{ width: auto; height: auto;}
#lightbox a img{ border: none; }
#outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
#imageContainer{ padding: 10px; }
#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}
#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; }
#imageData{ padding:0 10px; color: #666; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
#imageData #caption{ font-weight: bold; }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;}
#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }
Many thanks in advance,
Josh