如何居中div水平其父里面div用CSS?
<div id='parent' style='width: 100%;'>
<div id='child' style='width: 50px; height: 100px;'>Text</div>
</div>
Run Code Online (Sandbox Code Playgroud) We have developed an application that allows a user to download audio content. The use of application itself is free, but we charge for the content. In our current business model, we accept payments using premium-rated SMS (which increases the in-app user's balance), however, Apple rejects the app since they do not allow this model for their applications.
Is there any other way (except In App Purchase API) we can accept the payments with?
我有一个页面上有两个divs,它应该填满整个屏幕.
它们都有宽度= 100%
上面的高度应该由其内容(适合所有内容的最小可能高度)定义,并且永远不会显示任何滚动条.
较低的一个应该填满屏幕的其余部分.但是,如果其内容不适合div,则应显示垂直滚动条.
像这样:
<div id="header">This block should not display the scrollbars</div>
<div id="content">This block should fill the rest of the screen and show the vertical scrollbar if the content does not fit</div>
Run Code Online (Sandbox Code Playgroud)
我该怎么做CSS?
更新:
我正在寻找一种解决方案,不需要我设置上部div的固定高度.
那可能吗?