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.

Customize menu

Featured Replies

I am embedding a website that I have in HTML and CSS into WordPress.

I want to add the below menu inside it.

 

How to I change where the classes are in the default WordPress menu? I want to add classes into the ul and li in a menu.

There is a div between <nav> and <ul> how do I get rid of that?

 

 

<nav>
	<ul id="main-nav" class="clearfix">
		<li><a href="#">Home</a></li>
		<li><a href="#">About</a></li>
		<li><a href="#">FAQ</a></li>
                <li><a href="#">Contact Us</a></li>
	</ul>
</nav>

 

#main-nav {
	width: 100%;
	background: #ccc;
	margin: 0;
	padding: 0;
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 100;
	/* box shadow */
	-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 1px rgba(0,0,0,.4);
	-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 1px rgba(0,0,0,.4);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 1px rgba(0,0,0,.4);
}
#main-nav li {
	margin: 0;
	padding: 0;
	list-style: none;
	float: left;
	position: relative;
}
#main-nav li:first-child {
	margin-left: 10px;
}
#main-nav a {
	line-height: 100%;
	font-weight: bold;
	color: #000;
	display: block;
	padding: 14px 15px;
	text-decoration: none;
	text-shadow: 0 -1px 0 rgba(0,0,0,.5);
}
#main-nav a:hover {
	color: #fff;
	background: #474747;
	/* gradient */
	background: -webkit-gradient(linear, left top, left bottom, from(#282828), to(#4f4f4f));
	background: -moz-linear-gradient(top,  #282828,  #4f4f4f);
	background: linear-gradient(-90deg, #282828, #4f4f4f);
}

 

  • 2 weeks later...
  • 5 weeks later...

You might want to check out the custom navigation feature of WordPress so you avoid hard coding the links directly into the theme. This link will help if you're developing a custom theme:

 

http://codex.wordpress.org/Function_Reference/wp_nav_menu

 

If you're working with a pre-made or child theme, you'll want to look through your files for the navigation code (most likely the header.php) and edit the code from there. I'd suggest using a child theme if you aren't already so that you can copy over the header.php (or wherever your navigation code is) and edit it. This way your customizations won't be overwritten if you update the theme.

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.