Rounded Corners in Parent DIV not effecting Child DIVs

不问归期 提交于 2019-11-30 13:17:22

Try adding overflow: hidden; to the parent element. This fixed the problem for me.

Use padding on the div. If you make the padding equal to the radius you shouldn't have to worry about any overlap or the content appearing in the rounded areas.

<style>
.round{
border-radius:10px;
padding:10px;
background-color:red;
}
</style>

<div class="round">Rounded Corners</div>

Here is a helpful site that talks all about the CSS3 Border Radius: http://www.css3.info/preview/rounded-border/.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!