Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am using span tags to target some styles for two navigation bars in WP. However, the code is registered with php within two templates and it appears the span is not being picked up when I view the code WP is outputting and I am not sure why.
I have actually used span tags elsewhere in a loop and it works fine.
We can’t help you unless you provide something for us to work with (php code).
What does the code look like in the template?
Here is the code for the two nav bars. The first is in the header template and the second is in sidebar.
I don’t see any span tags?
In case you are interested, this worked in a loop.
@theDoc – sorry, they are actually just before the closing nav. I’ll edit the code.
done
In the code you posted, you didn’t close the PHP. It should be:
Sorry, that was my just my edit mistake above. The actual code does close the php.
And it doesn’t work…
Okay, and what isn’t happening? Are the span tags not showing? I see no reason why they shouldn’t. They should be appearing just as you have them, right before your closing nav.
That’s what I thought. The problem is that they are not picking up the styles and I am not sure why.
Aaahhhhh so they are appearing but they aren’t picking up the styles? What does the CSS look like?
ul.dropdown li span{
position:absolute;
left:-15px; top:5px;
width:15px; height:100%;
background-color:#647484;
background-image:url(images/navshadow.png);
background-position:right top;
background-repeat:repeat-y}
#sub-navigation ul li span{
position:absolute;
right:100%;
top:5px;
width:15px;
height:100%;
background-color:#647484;
background-image:url(images/navshadow.png);
background-position:right top;
background-repeat:repeat-y}