Search code examples
csshtmlblock

Align two block in a div


I have create this block: first image

and I would have two parts in this block, like this: second image

here is my block:

<div id="content_sc" > 
        <img src='images/paypal-donate.jpg'> 
</div>

and the css:

#content_sc {
top: 15px;
background: #fff;
width: 600px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
}

I tried a lot of things, but without achieving what I wanted to do


Solution

  • Here you go:

    http://jsfiddle.net/VALCw/

    Just a case of floating your two elements left and putting overflow on the container really.