Skip navigation
Currently Being Moderated

Sticky Dropdown Menus?

Mar 9, 2013 7:51 AM

Should the dropdown menu not close after you select a Link?  Here is the example:

 

Screen shot 2013-03-09 at 8.36.39 AM.png

 

In the background is the homepage with the dropdown from "mehrere" (more stuff).  When one selects a link, e.g. "Inns and Restaurants" it opens up a new window correctly.  When you close the "Inns and Restauarants" window  (and are returned to the Homepage) the dropdown is still open.  You have to click the homepage somewhere to close the dropdown.  Is there a way to have it "self-close"?  I thought this might have something to do with "self-closing" tags but can't find the answer. 

 

Here is the html:

 

<li><a href="index_deutsch.htm" target="_self" >Mehrere</a>

                              <ul>

                <li><br /><a href="HOMEPAGE_more_stuff/wineries.htm" target="_blank">Wineries</a><br /></li>

                <li><a href="HOMEPAGE_more_stuff/inns_restaurants.htm" target="_blank">Inns and Restaurants</a><br /></li>

                <li><a href="HOMEPAGE_more_stuff/art.htm" target="_blank">Art</a><br /></li>

                <li><a href="HOMEPAGE_more_stuff/books.htm" target="_blank">Books</a><br /></li>

                <li><a href="HOMEPAGE_more_stuff/letters_muensenberger.htm" target="_blank">The Civil War Letters of Corporal Adam Muenzenberger</a><br /></li>

                </ul>

          </li>

 

 

Thanks for your help.

 

Jim

 
Replies
  • Currently Being Moderated
    Mar 9, 2013 8:01 AM   in reply to jds zigzag

    try removing all the target="_self" and target="_blank" these all seem to be internat links,  this will keep reloading the pages and should cure the issue?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2013 2:17 PM   in reply to jds zigzag

    Web sites don't typically open page links in new browser windows/tabs as this is not web friendly and it takes up browser resources. 

     

    If people wish to open links in new windows/tabs, they can do this themselves with right click or by selecting this option in their browser preferences.

     

    The rule of thumb on the web is never mess with people's browsers.

     

    Also, Target="_blank" is deprecated code.  It won't validate.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2013 2:30 PM   in reply to mazz2000

    Using 'target="_self"' is an usage antique relevant only to the use of frames (including iframes). Using 'target="_blank"' (which is perfectly valid in HTML 4.01 or HTML5, but not XHTML) will cause each click to open the page in a new window or tab, depending on how your local browser is configured. Neither would have any impact on the problem at hand.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2013 2:34 PM   in reply to MurraySummers

    I'm sorry to contradict you Murray, but it would if the parent page is highlighting link on active/focus.  When the secondary page is closed, the parent page is still focusing on that link.  I believe that is the OPs concern.

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2013 2:42 PM   in reply to Nancy O.

    Oh - you read it differently than I did (and by the way, this also has nothing to do with 'self-closing tags'). You are right - clicking on the menu item gives it focus. But are you sure that the 'blur' created by shifting to another tab/window wouldn't cancel that?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 9, 2013 2:54 PM   in reply to MurraySummers

    See my demo below. Clicking either link maintains focus on return.

    http://www.alt-web.com/sandbox/HTML5Layout.html

     

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points