To make a div
element shrink automatically to the width of the div’s contents, add these CSS styles to the div in question:
1 2 | display : inline-block ; text-align : center ; |
Then add the following CSS styles to the parent div of the div in question:
1 | text-align : center ; |
Questions and Comments are Welcome