I have a horizontal navigation that I want to be centered. It
is left aligned right now, and I have tried a whole bunch of stuff,
but it won’t budge. I’m thinking I have some CSS somewhere that is
not allowing it to be centered, but I can’t see where that would
be. Can someone take a look and let me know if you have any ideas?
Anything would be helpful.
Thanks so much. here’s the link:
http://thebradfordcreativegroup.com/abs/3/
|||
#mainnav li {
float:left;
Your menu is floating left of other content on the page.
That’s why it
won’t center when you use html to align center.
margin: 0px 0px 0px 20px
You could add some extra pixels to your left margin. Try 45
instead of 20.
–Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
“joshuataylordesign” <webforumsuser@macromedia.com>
wrote in message
news:ft34ld$hug$1@forums.macromedia.com…
> I have a horizontal navigation that I want to be
centered. It is left
aligned
> right now, and I have tried a whole bunch of stuff, but
it won’t budge.
I’m
> thinking I have some CSS somewhere that is not allowing
it to be centered,
but
> I can’t see where that would be. Can someone take a look
and let me know
if you
> have any ideas? Anything would be helpful.
> Thanks so much. here’s the link:
>
http://thebradfordcreativegroup.com/abs/3/
>
|||
Nancy,
Thanks for your reply. I see that I have the li elements
floating left. That is how I was shown to make the horizontal
navigation. If I drop that, the navigation is vertical, which is
not what I want. Adding padding to the li elements could work, but
then they will all be very spread out, which is not what I am
looking for either. Is there a way to take all of the li elements
and put them in the center? or maybe a whole new way to make that
horizontal nav so I don’t have to use float:left.
thanks
|||
You don’t have to use unordered lists for menus.
CSS:
#menu {text-align:center}
HTML:
<div id=”menu”>
<a href=”#”>Home</a> |
<a href=”#”>Stuff</a> |
<a href=”#”>More stuff</a> |
<a href=”#”>Even more stuff</a>
</div>
Home | Stuff | More Stuff | Even More Stuff
–Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
“joshuataylordesign” <webforumsuser@macromedia.com>
wrote in message
news:ft3b6p$p95$1@forums.macromedia.com…
> Nancy,
> Thanks for your reply. I see that I have the li elements
floating left.
That
> is how I was shown to make the horizontal navigation. If
I drop that, the
> navigation is vertical, which is not what I want. Adding
padding to the li
> elements could work, but then they will all be very
spread out, which is
not
> what I am looking for either. Is there a way to take all
of the li
elements and
> put them in the center? or maybe a whole new way to make
that horizontal
nav so
> I don’t have to use float:left.
> thanks
>
|||
Nancy, thanks again.
I am aware that you don’t have to use a list to make a menu.
However, I was on the impression that it is considered best
practice because of accesibility reasons. Is this incorrect?
thanks
Related posts:
- Problems with Flash Navigation
- record set navigation bar problems
- Old macromedia menu stly navigation help
- Trouble with CP1′s Navigation Bar and Flash 8
- navigation bar DW8 question
Related posts brought to you by Yet Another Related Posts Plugin.