0

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

1
  • 1
    Please put a real question in your title/post. Commented Mar 11, 2012 at 18:56

4 Answers 4

3

float:left or display:inline-block.

#deck>div{
    display:inline-block;
}

Fiddle: http://jsfiddle.net/YuRpU/24/

Sign up to request clarification or add additional context in comments.

1 Comment

Yes: it needs to be placed on the div containing the img. (Also, had to +1 to kill your 666 score)
0

Add float:left to the img style declaration

img{ cursor: pointer; float:left;}  

fiddle: http://jsfiddle.net/YuRpU/22/

Comments

0

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>

Comments

0

You need to float the inner divs to make them wrap, have a look at http://jsfiddle.net/YuRpU/23/ .

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.