Reputation: 3913
i am making a image slider .i am trying to display images inline .i have apllied css also but it is not working :( image are not displayed inline. what property need to be change please help.
<div id="f1_container">
<div id="f1_card1" class="shadow">
<div class="front face">
<img src="thumb1.jpg" style="height: 281px; width: 450px;" />
</div>
<div class="back face center">
Some text inside here
</div>
</div>
<br/>
<br/>
<div id="f1_card2" class="shadow">
<div class="front face">
<img src="thumb2.jpg" style="height: 281px; width: 450px;" />
</div>
<div class="back face center">
text2
</div>
</div>
</div>
this is my CSS file,
#f1_container {
position: relative;
margin: 10px auto;
width: 450px;
height: 281px;
z-index: 1;
}
#f1_container {
-webkit-perspective: 1000;
perspective: 1000;
}
#f1_card {
width: 100%;
height: 100%;
-webkit-transform-style: preserve-3d;
-webkit-transition: all 1.0s linear;
transform-style: preserve-3d;
transition: all 1.0s linear;
}
#f1_container:hover #f1_card {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
box-shadow: -5px 5px 5px #aaa;
}
.face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.face.back {
display: block;
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
box-sizing: border-box;
color: white;
text-align: center;
background-color: #aaa;
}
Thanks and Regards,
Upvotes: 1
Views: 175
Reputation: 91
define style for shadow .. position:relative & float:left also remove br elements between divs with class shadow
Upvotes: 0
Reputation: 666
You mite want to put the image and text inside a div and float the div's so there in line with float:left;
Upvotes: 0