我有一个子div块和一个父div块。子块会更改其大小,但父块具有相同的大小。如何将父块手风琴调整为子块?
HTML:
.about_me
position: relative
top: 90px
width: 981px
SASS:
common.h:27:19: fatal error: cstdarg: No such file or directory
compilation terminated.
答案 0 :(得分:0)
<!DOCTYPE html>
<html>
<head>
<style>
.about_me{
position: relative;
top: 90px ;
width: 981px;
border: 1px solid #888;
}
.about_me_content{
width: 100%;
border: 1px solid
blue;
}
</style>
<body>
<div class="about_me">
<p>About me<img class="pencil" src="assets/pencil.png" alt=""></p>
<div class="about_me_content">
some information..
</div>
</div>
</body>
</html>
如果子块的宽度为%,则可以根据需要灵活设置。