Scott, give the inner div a specific width and define the left/right margins as auto:

#innerdiv {
    width: 300px; //Percentage width could be used here as well
    margin: 0 auto;
}

- or -

Do not define the width of the inner div but give it a percentage based left/right margin and a min-width:

#innerdiv {
    margin: 0 20%;
    min-width: 300px;
}

HTH.

On May 25, 2005, at 4:56 PM, Scott Haneda wrote:

I have a div inside a div, the inner div becomes as wide as the outer div. I want it to wrap the contents of what is inside the inner div, but to do that, I have to float that inner div. I want the inner centered in the outer, is there a trick I can use to make this happen?

Mike Stickel
Screenflicker Developments
www.screenflicker.com

p: 403-923-7667
e: [EMAIL PROTECTED]
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to