center align three divs that is float left without fixed width crossbrowser using css

Junior Spellweaver
Joined
Nov 15, 2009
Messages
106
Reaction score
1
as the title says, i am wondering and have been since a few hours,
how do i center align three divs that is float left without fixed width crossbrowser using css?
 
Without a fixed width?

You can always do:
Code:
<div id="body_expander">[INDENT]<div id="page">[/INDENT]
[INDENT=2]<div class="content">
</div>[/INDENT]
[INDENT]</div>[/INDENT]
</div>
Code:
#body_expander {[INDENT]width: 100%;
height: auto;[/INDENT]
}

#page {[INDENT]width: 60%;
height: auto;[/INDENT]
}

.content {[INDENT]width: 100%;
height: auto;[/INDENT]
}

I doubt that you can rule out the Width, since you can't simply: <div align="center">.


Best would be if you paste a snippet of your code and current CSS.


_________
Edit: looks to me like Chris already came up with an answer.
 
Back