,讓他們身邊,我裏面有1個格,像這樣3周的div ..3的div一個DIV中,試圖通過側
<div class="contentImages">
<div id="slideshow">
<img src="upload/<?php echo $array['image'] ?>" height="200" class="active" />
<img src="upload/<?php echo $array['image2'] ?>" height="200" />
<img src="upload/<?php echo $array['image3'] ?>" height="200" />
</div>
<div id="slideshow2">
<img src="upload/<?php echo $array['image4'] ?>" height="200" class="active" />
<img src="upload/<?php echo $array['image5'] ?>" height="200" />
<img src="upload/<?php echo $array['image6'] ?>" height="200" />
</div>
<div id="slideshow3">
<img src="upload/<?php echo $array['image7'] ?>" height="200" class="active" />
<img src="upload/<?php echo $array['image8'] ?>" height="200" />
<img src="upload/<?php echo $array['image9'] ?>" height="200" />
</div>
</div>
採取from here。
目前divs在彼此之下,但我試圖讓他們並排....任何想法?
這裏是CSS:
#slideshow {
position:relative;
height:200px;
}
#slideshow IMG {
position:absolute;
top:0;
left:0;
z-index:8;
opacity:0.0;
}
#slideshow IMG.active {
z-index:10;
opacity:1.0;
}
#slideshow IMG.last-active {
z-index:9;
}
#slideshow2 {
position:relative;
height:200px;
}
#slideshow2 IMG {
position:absolute;
top:0;
left:0;
z-index:8;
opacity:0.0;
}
#slideshow2 IMG.active {
z-index:10;
opacity:1.0;
}
#slideshow2 IMG.last-active {
z-index:9;
}
#slideshow3 {
position:relative;
height:200px;
}
#slideshow3 IMG {
position:absolute;
top:0;
left:0;
z-index:8;
opacity:0.0;
}
#slideshow3 IMG.active {
z-index:10;
opacity:1.0;
}
#slideshow3 IMG.last-active {
z-index:9;
}
.contentImages{
border:1px solid #CCC;
padding:10px;
margin:20px auto 0;
position:relative;
width:811px;
}
有我丟失的東西嗎?
我每個div有3張圖片的原因是因爲我有3個jquery幻燈片正在進行,每個div有一個。 jquery代碼很長,所以我不需要這個問題。
任何幫助將衷心感謝,感謝,
Ĵ
檢查[這裏](http://stackoverflow.com/questions/323599/css-layouts-how-to-position-two-divs-horizontally-within-another-div) – franka 2012-03-22 18:54:58