Hello I would like to make a grid layout sort of like the one of pinterest.
Here is how my layout looks with image placeholder. i want the each box of the grid to be 220×330. each box will have a picture on top, then below it wil be some buttons.
[code=html]<div class=”table_1″ style=”display:inline;”>
<img src=”http://placehold.it/220×330″/>
</div>
<div class=”table_2″ style=”display:inline;”>
<img src=”http://placehold.it/220×330″ />
</div>
<div class=”table_3″ style=”display:inline;”>
<img src=”http://placehold.it/220×330″/>
</div>
<div class=”table_4″>
<img src=”http://placehold.it/220×330″/>
</div>
this is the code for the grid which looks like this:
[url]http://imgur.com/6l7JK
However, once i try to add buttons to the bottom of each image. the boxes move below.
code:
[code=html]<div class=”table_1″ style=”display:inline;”>
<img src=”http://placehold.it/100×200″/><br>
<button>sadff</button><button>sadf</button>
</div>
<div class=”table_2″ style=”display:inline;”>
<img src=”http://placehold.it/100×200″ />
<br><button>sadff</button><button>sadf</button>
</div>
<div class=”table_3″ style=”display:inline;”>
<img src=”http://placehold.it/100×200″/>
<br> <button>sadff</button><button>sadf</button>
</div>
<div class=”table_4″>
<img src=”http://placehold.it/100×200″/>
<br><button>sadff</button><button>sadf</button>
</div>
this is how it looks like
[url]http://imgur.com/kpctl
the css:
[CODE].table_1{
width:220px;
overflow:hidden;
height:330px;
margin-top: 10px;
position:static;
display:inline;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
}
.table_2{
position:static;
width:220px;
height:330px;
overflow:hidden;
display:inline;
margin-top: 10px;
margin-bottom: 10px;
margin:0 auto;
margin-left: 10px;
margin-right: 10px;
}
.table_3{
position:static;
width:220px;
height:330px;
overflow:hidden;
display:inline;
margin-top: 10px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
}
.table_4{
position:static;
width:220px;
height:330px;
overflow:hidden;
display:inline;
margin-top: 10px;
display:inline;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
}
can anyone please help?
Thanks