I am working on a page where I have to divide the description boxes(named block2 here) into four groups and display 2 of them on each line. I added display:inline; tag to block2 but still each of the block is being displayed on a new line. I will be very thankful if anyone could help me out. Thanks
Here is my code,
.block2{
width:auto;
float:left;
display:inline;
background-color:#ECECEC;
padding:17px 13px 21px 22px;
margin:6px 6px 0 0;
color:#636363
}
.block2 p{
width:462px;
height:400px; <!-- Height of the box containing details(one for all) -->
float:left;
padding:19px 0 13px 16px;
}
.block2 p img{
float:left;
margin:0 10px 7px 0
}
And below is its HTML,
<div class="block2">
Provide here the details about first member
</div>
<div class="block2">
Member 2's details
</div>
<div class="block2">
Member 3's details
</div>
<div class="block2">
Member 4's details
</div>
It appears to have been a simple padding issue, where the width caused it to overflow. Glad I helped!