Ciao,
sto provando questa gallery di foto in ajax
http://www.webinforma.eu/lightbox/fotogallery/
Dovendo caricare foto con diverse forme pensavo di centrare le immagini non piene (come l'ultima che ho caricato nell'esempio)
Non riesco a centrarla nel div.
Qualcuno mi può dare una dritta?
Ho già provato a mettere nella classe 'image img' position: relative ma non funziona.
Riporto il codice del css che uso e la index.php
FILE CSS
* {margin:0; padding:0}
body {font:12px Verdana, Arial, Helvetica, sans-serif; background:#666 url(images/bg.gif)}
#gallery {position:relative; width:686px; margin:40px auto; padding:10px; border:6px solid #fff; background:#AAA}
#images {border:2px solid #9ac1c9; height:225px; background:#eef5f6; margin-bottom:20px}
#image {position:relative; width:672px; height:375px; padding:5px; border:2px solid #666; display: block;
margin-left: auto;
margin-right: auto;background:#FFF url(images/loading.gif) center center no-repeat}
#image img {position:absolute; top:5px; left:5px}
#thumbwrapper {margin-top:10px; padding:5px 0; width:682px; height:100px; border:2px solid #666; background:#FFF}
#thumbarea {position:relative; overflow:hidden; height:100px; width:682px; }
#thumbs {position:absolute; list-style:none; margin-left:5px; height:100px; width:10000px; border-right:5px solid #FFF}
#thumbs li {float:left; margin-right:5px; cursorointer}
.imgnav {position:absolute; height:375px; width:20%; z-index:100; height:375px; width:20%; z-index:100; outline:none; cursorointer}
#previmg {left:0; background:url(images/left.gif) left center no-repeat; border-left:5px solid #FFF}
#previmg:hover {opacity:1; filter:alpha(opacity=100)}
#nextimg {right:0; background:url(images/right.gif) right center no-repeat; border-right:5px solid #FFF}
#nextimg:hover {opacity:1; filter:alpha(opacity=100)}
INDEX
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>AJAX Photo Gallery</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="gallery">
<div id="imagearea" align="center">
<div id="image">
</div>
</div>
<div id="thumbwrapper">
<div id="thumbarea">
<ul id="thumbs">
<li value="1">[img]thumbs/1.jpg[/img]
<li value="2">[img]thumbs/2.jpg[/img]
<li value="3">[img]thumbs/3.jpg[/img]
<li value="4">[img]thumbs/4.jpg[/img]
<li value="5">[img]thumbs/5.jpg[/img]
[/list]
</div>
</div>
</div>
<script type="text/javascript">
var imgid = 'image';
var imgdir = 'fullsize';
var imgext = '.jpg';
var thumbid = 'thumbs';
var auto = true;
var autodelay = 6;
</script>
<script type="text/javascript" src="slide.js"></script>
</body>
</html>
Grazie..

ointer}
Rispondi quotando