PDA

View Full Version : Resolved Bug with menu item font.



brossyg
08-03-2009, 10:36 PM
1) Script Title: Any Link Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.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:


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:


["Stewardship Sermons", "stwsermons.htm"],

If I change the link file name address to anything else...like:


["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!!!

ddadmin
08-04-2009, 08:03 AM
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)?

brossyg
08-04-2009, 12:35 PM
I don't think so, but here are the CSS attrributes affecting this particular menu:


.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:


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:


<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:


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. ???????

brossyg
08-04-2009, 03:34 PM
Resolved!!!

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