Reply to Re: CSS drop down menu - how to centre it?

Your name:

Reply:


Posted by Ben C on 10/24/06 14:23

On 2006-10-24, John <john1949@yahoo.com> wrote:
> Thank you gentlemen
>
> Now working fine in IE. Not so in FF but I can live with that for the
> moment.

Even if you can, I'm still curious...

div#navbar ul {list-style: none;display: table;margin-left:
auto;margin-right: auto;padding: 0px;margin: 0px;}

The problem is that final margin: 0px, which is replacing margin-left:
auto and margin-right: auto.

You can use instead just:

div#navbar ul {list-style: none;display: table;padding: 0px;margin: 0px auto;}

margin: 0px auto;

means use "0px" for top and bottom, and auto for left and right.

And as John Hosking pointed out, you don't need those "px" after 0 after
all.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация