Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Really struggling with custom menu

Featured Replies

I admit it, I totally suck at menus. They confuse me something chronic....

 

I am trying to edit an existing theme menu, but I am finding it hard. The child menu items don't sit directly underneath each other (they are slightly to the right).

 

The third layer in the menu is way out too - way too far the right.

 

I am looking in the code and cannot see any crazy margins and I have been messing around with this for hours now.

 

Please could someone help me out...

 

The testing url is http://charlyanderson.co.uk/tester/ and it is the top navigation in purple that I am working on.

 

CSS that I have is:-

 

/** Menu Css **/

a#mobile_nav { display: none; }

#navigation {padding: 2px 0 0;  background:url(/tester/wp-content/themes/Evolution/images/menu-bg.png) no-repeat center top; text-align:center !important; height:60px; }



#top-menu {padding-top:3px; display:inline-block !important; margin-left: auto; margin-right: auto; }
#nav-container{margin: 0 auto; width: 960px; position: relative; text-align:center !important;}

#top-menu li { padding: 0; text-align:center !important; background-color:#C9F; min-width: 160px; position: relative;}
#top-menu a { color: #4d4d4d; text-decoration: none; padding: 15px; font-family: "Josefin Sans", sans-serif !important; text-transform:uppercase; font-size: 21px !important; }
#top-menu a:hover { color: #111;}

#top-menu > ul > li.current-menu-item > a {font-family: "Josefin Sans", sans-serif !important; text-transform:uppercase; font-size: 21px !important;}


ul.nav li ul { top: 45px !important; z-index: 9999; display: none; text-align:center !important;}
ul.nav ul li { margin: 0 !important; padding: 0 !important;}
ul.nav ul li a { padding: 10px 0px 10px 5px !important; min-width: 160px; border-top: 1px solid #ccc; border-left: 1px solid #ccc; border-right: 1px solid #ccc;  }
ul.nav ul li:last-child { border-bottom: 1px solid #ccc;  }
ul.nav ul li a:hover { color: #c6c6c6 !important; }
			
ul.nav li:hover ul ul, ul.nav li.sfHover ul ul { top: -1px !important; left: 234px !important; border-top: 1px solid #f0f0f0; }
.sf-sub-indicator{display:none !important;}

.nav ul { position:absolute; top:-999em; background-position: bottom; background-repeat: no-repeat; z-index: 10; }
.nav li { display:inline-block; text-align:center;}
.nav a { display:inline-block; text-align:center;}
.nav li:hover ul, ul.nav li.sfHover ul { left:0px; top:50px; }
.nav li:hover li ul, .nav li.sfHover li ul { top:-999em; }
.nav li li:hover ul, ul.nav li li.sfHover ul { left:192px; top:0px; }
.nav li:hover ul, .nav li li:hover ul { top: -999em; }
.nav li li {	display: inline-block;	padding: 0px; height: auto !important; }
.nav li ul { min-width: 191px; z-index:1000; }
.nav li li a:link, .nav li li a:visited {	display: inline-block; height: auto; }
.nav li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ 

 

  • Author

OK, I managed to get most of it done now wohooo... I am however having problems with the last menu item under the "what I do" section. It won't sit the same as the rest grr.

Edited by Charly

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.