"David Dorward" <do*****@yahoo.com> wrote in message
news:c8*******************@news.demon.co.uk...
CMAR wrote:
To center my <div>, I am currently using something like
<div id="navcontainer" align="center">
This centers fine, but is deprecated code.
http://dorward.me.uk/www/centre/#block (noting the bugs it describes in
IE, and the various work arounds)
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
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:xy*@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%;}