Reputation: 37
I know this is a simple question but I cant seem to get my head round it, can someone adivse me how I would arrange the images to be in a 3xgrid and/or fit in the big box?
this is the code - http://jsfiddle.net/kommandoss/YuRpU/21/
thank you
Upvotes: 0
Views: 74
Reputation: 6406
float:left
or display:inline-block
.
#deck>div{
display:inline-block;
}
Fiddle: http://jsfiddle.net/YuRpU/24/
Upvotes: 3
Reputation: 3097
You need to float the inner divs to make them wrap, have a look at http://jsfiddle.net/YuRpU/23/ .
Upvotes: 0
Reputation: 32494
div
is a block element and so will take up an entire line by default.
All you have to do is make them display inline OR get rid of the extra ones
<div>
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
</div>
<div>
<img src="" alt="" />
<img src="" alt="" />
<img src="" alt="" />
</div>
Upvotes: 0
Reputation: 15404
Add float:left to the img style declaration
img{ cursor: pointer; float:left;}
fiddle: http://jsfiddle.net/YuRpU/22/
Upvotes: 0