当前位置: 动力学知识库 > 问答 > 编程问答 >

css - Align two block in a div

问题描述:

I have create this block:

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

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

网友答案:

Here you go:

http://jsfiddle.net/VALCw/

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: