Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Using Span tags in WordPress Navigation

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 50 total)
  • Author
    Posts
  • #35323
    tobeeornot
    Member

    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.

    #91263
    chrisburton
    Participant

    We can’t help you unless you provide something for us to work with (php code).

    #91264
    TheDoc
    Member

    What does the code look like in the template?

    #91268
    tobeeornot
    Member

    Here is the code for the two nav bars. The first is in the header template and the second is in sidebar.

    #91269
    TheDoc
    Member

    I don’t see any span tags?

    #91270
    tobeeornot
    Member

    In case you are interested, this worked in a loop.



    get_date('F j, Y'); ?>


    get_permalink(); ?>">get_title(); ?>

    get_content(); ?>




    #91271
    tobeeornot
    Member

    @theDoc – sorry, they are actually just before the closing nav. I’ll edit the code.

    #91272
    tobeeornot
    Member

    done

    #91273
    TheDoc
    Member

    In the code you posted, you didn’t close the PHP. It should be:

    #91274
    tobeeornot
    Member

    Sorry, that was my just my edit mistake above. The actual code does close the php.

    #91275
    tobeeornot
    Member

    And it doesn’t work…

    #91276
    TheDoc
    Member

    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.

    #91278
    tobeeornot
    Member

    That’s what I thought. The problem is that they are not picking up the styles and I am not sure why.

    #91279
    TheDoc
    Member

    Aaahhhhh so they are appearing but they aren’t picking up the styles? What does the CSS look like?

    #91243
    tobeeornot
    Member

    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}
Viewing 15 posts - 1 through 15 (of 50 total)
  • The forum ‘CSS’ is closed to new topics and replies.