/    Sign up×
Community /Pin to ProfileBookmark

gird layout help

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>[/code]

this is the code for the grid which looks like this:
[url]http://imgur.com/6l7JK[/url]


————————————

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>[/code]

this is how it looks like
[url]http://imgur.com/kpctl[/url]

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;
}[/CODE]

can anyone please help?
Thanks

to post a comment
CSS

0Be the first to comment 😎

×

Success!

Help @mayankj94 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...