i'm actually trying to build a products list inside a table. I already have the php code which takes data from db and places in the page but i'm stuck with jquery and javascript, i'm such a noob in that. I've been reading around some documentation and i went out with this script:
javascript
$(window).load(function(){
$('.principale').hover(function() {
$(this).animate({
width: 215, height: 350, margin: 0,
}, 'fast');
/* $(this).animate().css('box-shadow', '0 0 10px #44f')*/
$(this).animate().css('box-shadow', '0 0 5px #000')
}, function() {
$(this).animate().css('box-shadow', 'none')
$(this).animate({
width: 210, height: 240, margin: 0,
}, 'fast');
});
});
css
.tabellainizio {
margin-top:100px;
}
.bordini {
border: 1px #DDD solid;
}
.principale {
height: 240px;
width: 210px;
overflow: hidden;
}
.principale .contenitore {
height: 240px;
width: 210px;
float: left;
display: block;
}
.immagine {
border: 1px solid maroon;
text-align: center;
margin: 15px;
height: 168px;
width: 168px;
position:relative;
}
.content {
display: none;
margin: 15px;
}
.contenitore:hover {
width: 215px;
height: 350px;
margin: 0px;
border: 1px solid black;
}
.contenitore:hover .content {
display: block;
}
.contenitore:hover .immagine {
position:relative;
}
you can see a demo here: http://jsfiddle.net/fozzo/EWJGJ/
But this isn't really what i need. When a div expands it should expand from the center over the others that should instead remain in their positions. I think this involve to use z-index and position in css as far as i read working examples but i really don't understand how to make it works. Any help would be apreciate.