html make divs in an element change size to fit others code example Example: make div the size of the text inside div { display: inline-block; }