Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6911959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:01:32+00:00 2026-05-27T09:01:32+00:00

I am using span tags to target some nub styles for a navigation bars

  • 0

I am using span tags to target some nub styles for a navigation bars in WP. However, the code is registered in a WP template and it appears the span is not being picked up when I view the code WP is outputting and I am not sure why. It must be the css is not picking up the span tag but I don’t know why.

Here is the template code:

<nav id="sub-navigation">
    <?php wp_nav_menu(array('menu' => 'Sub Nav Menu'));?>
<span></span></nav>

Here is the relevant css:

#sub-navigation{ margin:20px 0 30px 0}

#sub-navigation ul{list-style:none}

#sub-navigation li a{display:block;background-color:#647484;overflow: visible !  
important; color:white; font:1.4em Verdana,Geneva,sans-serif; padding:10px 10px 10px 
25px; position:relative; text-decoration:none; margin:0 0 5px 0; width:233px;}

#sub-navigation li a span{position:absolute; right:100%; top:5px; width:15px;   
height:100%; background-color:#647484; background-image:url(images/navshadow.png); 
background-position: top right; background-repeat:repeat-y;}

#sub-navigation li:nth-child(2) a, #sub-navigation li:nth-child(2) a span{background-  
color:#728c8c}
#sub-navigation li:nth-child(3) a, #sub-navigation li:nth-child(3) a span{background-
color:#768c72}
#sub-navigation li:nth-child(4) a, #sub-navigation li:nth-child(4) a span{background-  
color:#909673}
#sub-navigation li:nth-child(5) a, #sub-navigation li:nth-child(5) a span{background-  
color:#647484}
#sub-navigation li:nth-child(6) a, #sub-navigation li:nth-child(6) a span{background-  
color:#728c8c}

#sub-navigation li a:hover{text-decoration:none; background-color:#666}
#sub-navigation li a:hover span{background-color:#666}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:01:33+00:00Added an answer on May 27, 2026 at 9:01 am

    According to the WordPress “wp_nav_menu” documentation, you can use link_before to set the text that precedes the link text inside tag:

    wp_nav_menu( array( 'menu' => 'Sub Nav Menu', 'link_before' => '<span>/<span>' ) );

    Try using that to assign the empty span tags in your menus.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following jquery code: $(#top ul li.corner).mouseover(function(){ $(span.left-corner).addClass(left-corner-hover); $(span.right-corner).addClass(right-corner-hover); $(span.content).addClass(content-hover); }).mouseout(function(){
I am hiding an element using inline css, like so: <span class=hidden-nojs style=display:none>Some text</span>
I have the following code in a partial view (using Spark): <span id=selectCount>0</span> video(s)
Here is html code, <li class=comment-content> Target String!!! <span class=comment-time>2011-07-13 17:08:39</span> <a title=comment class=bottoml
I am using ckeditor in drupal and add some html tags in it like
I am using this to extract SPAN tags and tell how many there is.
I'm using DOM to parse string. I need function that strips span tags and
I'm using this code to search trough about 500 li tags. $(function() { $.expr[:].containsInCaseSensitive
I have a span tag and that holds some n number of span tags..
Google recommends using the attribute itemscope with div tags and span tags. Can they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.