The title pretty much says it all, when there is extra text added to the div it should keep the bottom border of the div at the same spot and the top border should rise as high as necessary to acoomodate the extra text. The width is fixed.
I haven't tried many different things because I just can't find anything similar.
EDIT: the reason I want to do this is because I want to anchor the bottom right corner of an html element on a certain spot in my cesium viewer. At the moment I just fixed the width but I could use the same thing for the width. The bottom right corner should keep it's position next to the entity on the Cesium map.