how to keep the content inside a div not take the entaire width of parent div code example Example: make div the size of the text inside div { display: inline-block; }