0

我需要那些 div 来构建一个 jQuery 幻灯片。divx div 包含图像。左列 (.left) 包含填充整个列宽的滑块。如何在#divx 中居中图像(它们有不同的尺寸)?

<div class = "left">

<p> Bla bla.</p>
<div id = "slider">
    <div>
   <img src="img/johndoe.png">  
   </div>
   <div>
   <img src="img/johndoe2.png">  
   </div>
</div> <!--end of slider-->

</div> <!--end of left-->

和 CSS

.left {
margin-top:1%;
margin-left:1%;
max-width:48%;
float:left;
padding:1%;
}

#slider {
position:relative;
width:100%;

}

#slider #divx {
    position:absolute;
}
4

1 回答 1

0

The div around each image, create a css

display:block;
margin-left:auto;
margin-right:auto;
于 2013-12-14T16:26:49.327 回答