Link not working inside of
  • 2019-06-09 22:33发布

    问题:

    I looked at the answers to similar questions, but none provided the help I need; I'm still getting unresponsive links !? To be clearer, by unresponsive links I mean the link does not work; they style exactly as expected.

    Here's the CSS:

    #nav3 { padding: 0; margin:15px 15px 0; height:29px; background-repeat: repeat; background-position: left top; }
    .ddcolortabs { padding: 0; width: 100%; }
    .ddcolortabs ul { font: normal 13px Arial, Verdana, sans-serif; margin:0 0 0; padding:0; list-style:none; }
    .ddcolortabs li { display:inline; margin:0 2px 0 0; padding:0; }
    .ddcolortabs a { float:left; color: #4963AE; background: #B9D6E5 url(../../content/themes/wd/images/tabs/color_tabs_left.png) no-repeat left top; margin:0 6px 0 0; padding:0 0 1px 3px; text-decoration:none; letter-spacing: 1px; font-weight: bold; }
    .ddcolortabs a.selected { background: #98a5d3 url(../../content/themes/wd/images/tabs/color_tabs_left.png) no-repeat left top; color: #FFF; }
    .ddcolortabs a span { float:left; display:block; padding: 8px 20px 6px 19px; background: transparent url(../../content/themes/wd/images/tabs/color_tabs_right.png) no-repeat right top; }
    

    And here's the html:

    <div id="nav3">
        <div id="colortab2" class="ddcolortabs">
            <ul style="margin-left:10px;">
                <li><a href="../MostActive"><span>Most Active</span></a> </li>
                <li><a href="#" class="selected"><span>Most Popular</span></a></li>
                <li><a href="../MostRecent"><span>Most Recent</span></a></li>
                <li><a href="../BrowseCategories"><span>Browse Categories</span></a></li>       
            </ul>       
        </div>
    </div>
    

    回答1:

    My bad, higher in the markup I had a div styled with z-index: -1



    回答2:

    I just ran into this issue. I solved it by including the full link for the page plus the anchor.

    <a href="/PAGENAME#anchor-link">Click here</a>

    Annoying issue to have. It was working fine locally prior to making this change. I am not sure if the web host's server plays a part in this somehow?



    标签: html anchor