Forums

Nav Bar bottom decoration creeps with hover (9 posts)

  1. yorick
    Member
    Posted 5 years ago #

    Ok, so I abandoned F3Green for Silver_Lexus_08, which turned out to be much more stable and spiffy looking. I'm almost done tweaking the graphics to match my existing site, but I wanted to add my links to the page, which SL8 doesn't do automatically. I added a loop to the sidebar as follows:

    <?php } ?>

      <li class="listHeader"><h2><?php _e('Archives'); ?></h2>
      <?php wp_get_archives('type=monthly'); ?>
      <li class="listHeader"><h2><?php _e('Categories'); ?></h2>
      <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>

    strong

      <li class="listHeader"><h2><?php _e('Links'); ?></h2>
      <?php wp_get_links('sort_column=name'); ?>

    strong
    <?php endif; ?>
    </div>

    Where the Links UL loop is the new code I added. Worked great and the Links module popped in.

    HOWEVER, I have a weird issue where the bottom decoration bar (black in my case) seems to spread when I drag my cursor over it. When I open the page, it has spread up over some of the link names, and if I wave my cursor over it, it shrinks. I'm still learning the ins and outs of CSS, so I'm wondering if this is a common problem, or if anyone can point me toward a solution. I'd hate to drop the links bar altogether.

    FYI, I'm currently programming on IE and haven't tested Firefox yet, since I haven't gotten around to uploading it to my home system and I'm trying desperately to pretend I'm taking the long weekend off, even though I've been at my desk since 9 this morning.

    Thanks for any advice. :)

  2. moshu
    Member
    Posted 5 years ago #

    The above code is messed up... You should put the CODE itself in between backticks, NOT the "word" :)

    Here is your source code (and is wrong, of course!)
    <ul><li class="listHeader"><h2>Links</h2></li>
    <a href="http://www.bardcentral.com/contact.php">Contact Us</a><br />
    <a href="http://www.bardcentral.com/shakespeare">Poor Yorick Resources</a><br />
    <a href="http://www.bardcentral.com">Shop Main Page</a><br />
    </ul>

    All this link items should be in between <li> and </li> no br tags needed!

  3. yorick
    Member
    Posted 5 years ago #

    Moshu,

    I'm afraid I don't understand. The template included a php for the links, but no code to insert it. I didn't write the sourcecode for the links section - the php built it that way, taking the links from the wordpress admin. Are you saying I need to hard code the links in myself, instead of letting the module fill them in automatically?

  4. moshu
    Member
    Posted 5 years ago #

    The links added/created in the admin > Links etc. subpanel should be displayed by the Links Manager template tags:
    http://codex.wordpress.org/Template_Tags#Links_Manager_tags
    - no special "php code" needed for them.

    Now, in the admin panel > Links > Link Categories: you will see a Formatting Option - before link and after link. Normally, those should be <li> and </li>, so that the links are listed (literally ;) as list items and your stylesheet would apply to them: displaying them correctly.

    [Wondering: you succeed to always pick up wrongly coded themes or you manage to mess their code?]

  5. yorick
    Member
    Posted 5 years ago #

    Moshu,

    I haven't touched any of the code in either case, except to change the graphical elements. Everything I know about CSS I've learned in the past 48 hours (and frankly, I think I've done a pretty good job under the circumstances). The only code I changed was to add the links to the sidebar.php in this instance. Everything that got filled in afterwards was what I was given.

    If you look at the test page for F3Green and click on the title of the first post, you will see that the resulting page (in IE, at least) gives you the same results that I experienced after spending many hours adapting the main page to fit my graphical outlay. If you click on the Archive link for the month on that site, you will also see that the footer changes width.

    I don't mess with code I don't understand, and frankly it's not very helpful to me when you keep making assumptions that I'm stupid or making mistakes instead of helping me to figure out what is wrong. It's hard enough trying to figure out how to adapt things that work, let alone the frustration of realizing that I've been struggling with something that is inherently wrong with the program. I'm just doing my best.

  6. moshu
    Member
    Posted 5 years ago #

    The only code I changed was to add the links to the sidebar.php in this instance.

    The only question is HOW did you do that. In my post above I gave you the right way to do it. If your links were displayed as list item - they would be OK.

    [Don't write me about my style and about "how" should I help, and how mean I am. I am immune to it...
    Instead, try to follow the resources and instructions I gave you. I never reply to a post unless I am 100% convinced the resources, directions are correct.]

  7. yorick
    Member
    Posted 5 years ago #

    All I did was add the code I noted above to the sidebar.php. The link.php was already part of the package. As I said before, I didn't code the part that generated the source code you quoted. Since that code came with the template, it's a lot harder for me to debug someone else's error than it is for me to backtrack and undo my own.

    Your directions so far have assumed I was responsible for code placement in the source code you quoted. Since all I did was add:

    <li class="listHeader"><h2><?php _e('Links'); ?></h2>
    <?php wp_get_links('sort_column=name'); ?>

    to the sidebar file. Since it does not appear to me that this code would have generated the source code error, it is not clear to me how to fix the mistake at all. Did I not add the correct code in the right place, or does this have to be fixed somewhere else?

  8. moshu
    Member
    Posted 5 years ago #

    I told you above what to do in the admin panel. You never reported back about it. You are better at rambling than at careful reading!

    OK, if that was too complicated - here is another fix:
    USE ANOTHER TEMPLATE TAG: <?php get_links_list('name'); ?>

  9. yorick
    Member
    Posted 5 years ago #

    Moshu,

    I didn't respond to those points because it was not clear to me that you were responding to the question I asked. I have adjusted the links admin, which was incorrect as you suggested, but it does not seem to affect my resulting source code.

    If I change my sidebar code to <?php get_links_list('name'); ?>, the links bar on the website changes to read:

    WordPress database error: [Unknown column 'name' in 'where clause']
    SELECT cat_id, cat_name, auto_toggle, show_images, show_description, show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, text_after_all, list_limit FROM wp_linkcategories WHERE cat_id=name

    Careful reading goes both ways. I can't follow your advice if you haven't understood the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic