I spend the whole afternoon searching, trying many ways but they all don't work. What I want to do is align the div with id="container" (which contain my drop-down menu) to the center of the page.
Here's my code: http://jsbin.com/ilupuf/2/
Asked
Active
Viewed 246 times
0

sonlexqt
- 6,011
- 5
- 42
- 58
-
It's clearing the floats issue, refer my answer http://stackoverflow.com/questions/12871710/why-clear-both-css/12871734#12871734 – Mr. Alien Jul 16 '13 at 11:43
3 Answers
0
Dante, take a look at this:
http://jsbin.com/ilupuf/23/edit
You just have to adjust the menu's width - you didn't specify whether it should have fixed width or not, so I assumed that it doesn't have to stretch to fit the contents.

biphobe
- 4,525
- 3
- 35
- 46