close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Center Horiz Menu with evenly spaced Menu <li> items

Thread began 1/11/2012 10:23 am by toni272059 | Last modified 1/12/2012 4:45 pm by toni272059 | 3809 views | 2 replies |

toni272059

Center Horiz Menu with evenly spaced Menu <li> items

Center Entire Menu on Page
-- I am trying to center the entire horizontal menu on the page while also having even spacing between the Main menu items.
-- I have tried margin: 0 auto; did not do anything

Equal Spacing between Main menu items
-- in order to achieve the equal spacing between menu items I removed the box item width and increased padding on both left and right.

Problem: Level 1 Sub Menu items are not centering under parent Main menu item
-- text align is set to center for all menu items, both Main and Level 1 however the sub menu group is not centering under its parent item

Test page for horizontal menu link: crew-2.html

UPDATE
I have been working at customizing the CSS to achieve a visual centered look and to adjust the Level 1 Sub Menu to line up under its Level 0 parent

Upon reviewing the page with browsers on both PC and MAC the menu styling is not working with IE on PC. It does work with Firefox, Opera, Chrome and Safari on PC and Firefox and Safari on MAC. Not working on IE 7 and IE 8 is a BIG PROBLEM! What's not working/What am I doing wrong or missing?

Sign in to reply to this post

Jason ByrnesWebAssist

your top level menu does not have a width specified.

for compatibility with IE, you must specify a width and height for the menu items using a pixel measurement.

leaving the width or height blank, or using auto will not work in IE.

wher you are trying to give a unique width to each top level item, you will need to add an inline width to the menu html


for example:
<li><span><a href="index.html" style="width: 80px;">HOME</a></span></li>

Sign in to reply to this post

toni272059

Center Horiz Menu with evenly spaced Menu <li> items

I added a width to the overall <ul> and that solved the IE problem. Setting fixed widths for the individual <il> does not work cross browser if the goal is to create equal spacing between each menu item.

After searching online I found one possible solution -- instead of float:left; for <li> use display:inline-block; which I am testing out.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...