I have a div element with style attached:
.mypost { border: 1px solid Peru; font-family: arial; margin: auto; min-width: 700px; width: 700px;
I'd like to add to the other answers this pretty new solution:
If you don't want the element to become inline-block, you can do this:
.parent{ width: min-content; }
The support is increasing fast, so when edge decides to implement it, it will be really great: http://caniuse.com/#search=intrinsic