Results 1 to 4 of 4

Thread: Bug with menu item font.

  1. #1
    Join Date
    Aug 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Bug with menu item font.

    1) Script Title: Any Link Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem:

    I have an AnyLinkMenu that works perfectly in IE7, except for one thing. If the address link in the menu item is a certain file name, the font in the menu item does not conform to the CSS specs.

    The full array is:

    Code:
    var anylinkmenu3={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} 
    anylinkmenu3.items=[
    	["Stewardship Sermons", "stwsermons.htm"],
    	["Personal Financial Stewardship", "moneymatters.htm"],
    	["Youth Stewardship", "youthstw.htm"],
    	["Stewardship Sourcebook", "CoresponsabilidadSpanish.htm"] //no comma following last entry!
    ]
    There are four items in the menu and all menu item labels should be 8 pt red ... and they are except for the first menu item label, which is the default font (blue 10 pt) with this link file name address:

    Code:
    ["Stewardship Sermons", "stwsermons.htm"],
    If I change the link file name address to anything else...like:

    Code:
    ["Stewardship Sermons", "stwsermonsa.htm"],
    then the label is 8pt red the way it should be...

    This happens regardless of the order I put the items in...the one with this file name is always the default font...not the CSS font. Also, there is no other instance of stwsermons.htm on the page, nor in the menucontents.js (although I can't see why that would matter...I checked anyway).

    It also does this with one other link file name address in another menu array, but none of the others are affected.

    I have tried for hours to figure this out, but I can not figure out why it does this...HELP!!!
    Last edited by Snookerman; 08-04-2009 at 04:47 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm I don't see how a particular file name can have any effect on its style within the menu. Are you sure there aren't other CSS rules on your page that may be causing this, such as a:visited that changes the color of visited links, in which stwsermons.htm is one of them (for you)?
    DD Admin

  3. #3
    Join Date
    Aug 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I don't think so, but here are the CSS attrributes affecting this particular menu:

    Code:
    .anylinkmenu{
    border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; border-bottom:0px solid black; position: absolute;
    left: 0;
    top: 0;
    visibility: hidden;
    line-height: 18px;
    z-index: 100; /* zIndex should be greater than that of shadow's below */
    background: #FFFFFF;
    width: 200px
    
    }
    
    .anylinkmenu ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    }
    
    .anylinkmenu ul li a{
    width: 100%;
    display: block;
    text-indent: 3px;
    border-bottom: 1px solid black;
    padding: 2px 0;
    font-size: 8pt;
    font-family: Verdana, Arial, Helvetica, Sans-Serif; 
    color: #FF0000;
    text-decoration: none;
    font-weight: normal;
    text-indent: 5px;
    
    }
    
    
    .anylinkmenu a:hover{ /*hover background color*/
    background: #CDCDCD;
    font-size: 8pt;
    font-family: Verdana, Arial, Helvetica, Sans-Serif; 
    color: #000099;
    }
    and here is the entire menucontents.js contents:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} 
    anylinkmenu1.items=[
    	["Bulletin/Newsletter Inserts", "Stewardship.htm"],
    	["Stewardship", "Stewardship.htm"],
    	["Co-Responsabilidad", "Coresponsabilidad.htm"],
    	["¡en español!", "CoresponsabilidadSpanish.htm"],
    	["Graceful Generosity", "Stewardship.htm#gracgen"],
    	["The Stewardship Toolkit", "buildgracgen.htm"] //no comma following last entry!
    ]
    
    
    
    var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} 
    anylinkmenu2.items=[
    	["Complete Response Programs", "programs.htm"],
    	["Bible Studies", "biblestudies.htm"],
    	["Devotionals", "devotionals.htm"],
    	["Tri-fold Brochures", "trifolds.htm"] //no comma following last entry!
    ]
    
    
    
    var anylinkmenu3={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} 
    anylinkmenu3.items=[
    	["Stewardship Sermons", "stwsermons.htm"],
    	["Personal Financial Stewardship", "moneymatters.htm"],
    	["Youth Stewardship", "youthstw.htm"],
    	["Stewardship Sourcebook", "CoresponsabilidadSpanish.htm"] //no comma following last entry!
    ]
    
    
    
    var anylinkmenu4={divclass:'anylinkmenu1', inlinestyle:'', linktarget:''} 
    anylinkmenu4.items=[
    	["Proclaim Sermons", "http://www.parishpublishing.org/proclaimsermons.default.asp"],
    	["Stewardship Sermons", "stwsermons.htm"] //no comma following last entry!
    ]
    and here is the html on the page that generates the menu:

    Code:
    <tr>
           		   <td align="right"><a class="menuanchorclass" rel="anylinkmenu1" rev="lr"><span class="quote">On-Going Inspiration</span></a></td>
                </tr> 
           		
           	    <tr>
                   <td align="right"><a class="menuanchorclass" rel="anylinkmenu2" rev="lr"><span CLASS="quote">Focus on Commitment</span></a></td>
           	    </tr>
           		
    		    <tr> 
           		   <td align="right"><a class="menuanchorclass" rel="anylinkmenu3" rev="lr"><span CLASS="quote">Other Resources</span></a></td>
           	    </tr>
           		
           	    <tr> 
           		   <td align="right"><a href="digitalproducts.htm"><span CLASS="quote">Downloadable Materials</span></a></td>
           	    </tr>
           		
           	    <tr>
           		   <td align="center">
           		      <hr color="#A08461" size="1">
           		      <a class="menuanchorclass" rel="anylinkmenu4" rev="lr"><span CLASS="pageheader10">Preaching Resources</span></a>
           		   </td>
           	    </tr>
    And here is a link to the result:

    Code:
    http://www.parishpublishing.org/teststwsermons1.htm
    If you navigatge the menu, you will see that the CSS of the menu item labels is not consistent...but should be. ???????

  4. #4
    Join Date
    Aug 2009
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Resolved!!!

    It was confilcting with two other CSS attributes (visiter and link) in the main CSS file. Thank you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •