javascript - why only height is adjustable of parent div if child div is resizeable? -


i new in html development . sharing simple code have 2 div . 1 div parent div , second div it's child div .so problem when resizing child div height adjustable when resizing chid div right side width of parent div not adjustable want . please me . following code :

<div style='border:1px solid;padding:20px;width:auto;height:auto;'>    <div style="resize: both;overflow:auto;border:1px solid;width:500px;height:200px;"/>  </div> 

you have use display: inline-block.

.first {    border:1px solid;    padding:20px;    width:auto;    height:auto;    display: inline-block;  }  .second {    resize: both;    overflow:auto;    border:1px solid;    width:500px;    height:200px;  }
<div class="first">   <div class="first">     <div class="second"></div>    <br>  <div class="second"></div>     </div>    </div>


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -