tags:

views:

46

answers:

4

I'm trying to fit three images inside a div, but I'm having trouble getting them to align properly. This is what I have in mind:

alt text

But I can't for the life of me figure this one out. Can anyone please lend a hand? Thanks!

A: 

If changing markup is allowed, I propose to wrap img 1 and 2 in another div - then it is just a matter of floating the div to the left.

NPC
+1  A: 

http://jsfiddle.net/tMxkX/2/

fantactuka
A: 

CSS

div#container {
    width:400px;
    height: 400px;
    padding:50px;
    background: red;
}
div.leftbox {
    float: left;
    width:175px;
    height: 175px;
    margin-bottom: 50px;
    background: blue;
}
div.rightbox {
    float: right;
    width: 175px;
    height: 400px;
    background: yellow;
}

HTML

<div id="container">
    <div class="rightbox">
        Right Image Box
    </div>
    <div class="leftbox">
        Left Image Box Top
    </div>
    <div class="leftbox">
        Left Image Box Bottom
    </div>
</div>
swaterfall
Thanks swat, this worked out exactly as I needed!
HuitZiloP
A: 

Can you post the html and css?

Ed Bishop