In a div with a height of 30, the height of the objects placed inside is 25. I hope to set it in the outer div so that the objects inside are aligned. However, after setting padding-top, the outer div is stretched open and the inner objects are It is OK to set margin-top:5px, but it is uncertain what and how many things should be placed inside, so I do not want to set it in the internal object.
<div style="height:30px;width:100%;border:1px solid red;vertical-align:bottom;padding-top:5px"><div style="height:25px;border:1px solid green">dd</div> </div>
It seems that only absolute positioning can be used