Centering a css dropdown menu?

Since you are using float, the only way to center it is to apply a width to the containing element and use margin-left: auto; margin-right: auto. There is no way to do this will retaining the flexible width An alternative to float would be display:inline-block; These can be centered using text-align:center, but you'll have to rework the css.

Since you are using float, the only way to center it is to apply a width to the containing element and use margin-left: auto; margin-right: auto. There is no way to do this will retaining the flexible width. An alternative to float would be display:inline-block; These can be centered using text-align:center, but you'll have to rework the css.

Thanks, works great! I'm using the cleaner solution of display: inline-block. – Marcus Edensky Jul 1 at 17:13 Just a word of caution.

If using inline block whitespace between the elements is rendered (where it is not when using float). To make the elements touch each other make sure there is no whitespace between them in your html. – Gerben Jul 1 at 17:28.

Well, here's one way to do it, you can put a div container around the menu... #menuContainer{margin: auto;}.

Actually I tried that, but as Gerben says, you can't because of the float: left. – Marcus Edensky Jul 1 at 17:16.

Menu li a. Menu li a. Menu li a.

Down {float:left; display:block; padding:0 24px 0 12px; height:40px; background:url(images/down. Menu li a. Menu li a.

Menu li a. Menu li:hover > a. Menu li:hover > a.

Menu li:hover > a. Menu :hover ul. Menu :hover ul.

Menu :hover ul. Menu :hover ul. Fly {background:#fff url(images/arrow.

Menu :hover ul. Menu :hover ul. Fly:hover {background:#999999 url(images/arrow_over.

Menu :hover ul li:hover > a. Fly {background:#999999 url(images/arrow_over.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions