Not set auto height?

Hello!
Don't see why not set heidht: auto block .theme_topic?
<div class="theme_topic">
 <div class="user_name_of_topic">
 <a href="#" class="thumbnail">
 <img src="http://placehold.it/70x70">
</a>
</div>
 <div class="text_of_topic"></div>
<div class="stuffs_of_topic"></div>
 </div>


.theme_topic{
 padding: 5px 10px;
 background: #fff;
 margin: 0 auto;
 width: 100%;
 position: relative;
 height: auto;
}
.user_name_of_topic{
 float: left;
 position: absolute;

}

https://jsfiddle.net/svilkov87/27d05tyL/
Thank you.
July 2nd 19 at 17:01
1 answer
July 2nd 19 at 17:03
Because of its child block (user_name_of_topic) drops out of the standard context (float, absolute positioning), and apart from him it does not contain anything that would have been the height.
but if I need a float for the element? - viva_Veum commented on July 2nd 19 at 17:06
to make the parent block (theme_topic) css overflow:hidden, for example (if you want auto height); or you can specify a specific height. - Joshuah.Dach commented on July 2nd 19 at 17:09

Find more questions by tags CSS