Would it be possible to make the innermost div
as wide as the section
in my nested structure?
Below is a snippet of the code:
body {
margin: 0 auto;
padding: 0;
background-color: blue;
}
#content {
background-color: orange;
padding: 20px;
width: 300px;
height: 100px;
margin: 0 auto;
}
#inner {
background-color: pink;
}
<body>
<section id="content">
<div>
<p>
test
</p>
<div id="inner">
<p>
inner
</p>
</div>
</div>
</section>
</body>