"David Dorward" <dorward@yahoo.com> wrote in message
news:c8j2cv$l05$1$8300dec7@news.demon.co.uk...[color=blue]
> CMAR wrote:
>[color=green]
> >
> > To center my <div>, I am currently using something like
> > <div id="navcontainer" align="center">
> > This centers fine, but is deprecated code.[/color]
>
>
http://dorward.me.uk/www/centre/#block (noting the bugs it describes in[/color]
IE,[color=blue]
> and the various work arounds)
>
> --
> David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>[/color]
Thanks to David and Steve for the very useful posts.
David, I was able to use your code with some modification and tweaking to
get the centering I want. It looks good in IE6. I assume that it will also
be centered in IE5 and IE5.5, since that was the whole purpose of the
exercise.
<div style="text-align:center;">
<div id="navcontainer">
<ul id="navlist">
<li><a href="mailto:xyz@efg.com" title="Send email">Email</a></li>
<li><a href="order.htm" title="orders">To Order</a></li>
<li><a href="index.html" title="Homepage">Home</a></li>
</ul>
</div>
</div>
The relevant style is
#navcontainer {background-color: #FF8040; margin-left: auto; margin-right:
auto;
padding-top: .45em; width: 100%;}