Can you run that by me again lol
I'm not quite sure what you are asking but a div with no height specified (height:auto) will be as high as the content requires. The same goes for width except that if you have a border it will be 100% wide.
Perhaps thats what you mean
The only way I can think of is when you make the parent absolute and then it collapses to fit the content (but of course it causes other display issues).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
border:1px solid red;
<div id="outer"><p>Hello this is some text</p></div>