I am currently working with a <div>
that I need to center using margins and have it grow as content fills it. To achieve this, I am utilizing min-width and min-height properties, but the issue I'm facing is that the child <div>
is inheriting the width of its parent element (<body>
).
Is there a way to prevent this behavior?
For reference, here is an example: http://jsfiddle.net/kRF5d/1/