I am trying to create a grid of boxes that fills the browser width and wraps nicely using the display: inline-block pair/value. I'm a newbie, but in any case I am not getting the desired effect. Below is my code, please help:
.ifieds{
display: inline-block;
width: 660px;
}
.classbox1{
width:361px;
height:282px;
border-radius: 5px;
background-image: url(https://optometryadmissions.files.wordpress.com/2013/10/istock_000019402859xsmall.jpg);
background-color:#CEB5A1;
margin-bottom: 15px;
}
.classbox1 > p{
margin: auto;
}
.classbox2{
width:660px;
height:283px;
border-radius: 5px;
background-image: url();
background-color:#CEB5A1;
margin-bottom: 15px;
}
.classbox3{
width:359px;
height:279px;
border-radius: 5px;
background-image: url();
background-color:#CEB5A1;
margin-bottom: 15px;
}
.classbox4{
width:459px;
height:282px;
border-radius: 5px;
background-image: url();
background-color:#CEB5A1;
margin-bottom: 15px;
}
.classbox5{
width:361px;
height:282px;
border-radius: 5px;
background-image: url();
background-color:#CEB5A1;
margin-bottom: 15px;
}
<!--html codes-->
<div class="ifieds">
<div class="classbox1">Jobs</div>
<div class="classbox2">Cars and Vehicle</div>
<div class="classbox3">Apartment Rental</div>
<div class="classbox4">Houses for Sale</div>
<div class="classbox5">Pro Services</div>
</div>