Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:50
Still stuck on border and parse error
Poster: Maz
Dated: Thursday January 1 2004 - 23:42:54 GMT
When i validated my page I get parse error on the css for offclass that is on my template, the offclass is not showing on the menu either. I don't get this for onclass. But with onclass I get the double border.
Can anyone please help resolve this, I've been waiting patiently for a solution. You can see what happens on the -www- link below:
Thanks,
maz
Poster: JMM
Dated: Friday January 2 2004 - 21:43:14 GMT
The parse error is because the // that you're using in your stlyesheet is not right. CSS comments use the /* comment */ syntax. Other than that, in an internal stylesheet like yours, syntactically you're allowed to use HTML comments around the entire stylsheet, e.g.
Code:
<style>
<!--
.whatever {
text-align: left;
}
-->
</style>
<!--
.whatever {
text-align: left;
}
-->
</style>
I'd guess that's why your offclass isn't showing, probably the browser isn't able to parse it.
In IE 6 Win I get a JavaScript error every time I mouse over one of your menu links. I don't get the error and the menus work in Netscape 7.1 Win.
Poster: Maz
Dated: Friday January 2 2004 - 23:46:30 GMT
Hey thanks,
Now I sorted that out, I'm trying to see how to get one border, instead of getting less borders they are multiplying like rabbits.
I'm getting borders from oncolor, bordercolor, onclass, offclass, onborder.
I'll keep playing to see if I can get one border somewhere

maz
Poster: kevin3442
Dated: Saturday January 3 2004 - 0:25:45 GMT
JMM wrote:
The parse error is because the // that you're using in your stlyesheet is not right. CSS comments use the /* comment */ syntax...
Nice catch JMM

Kevin
Poster: Maz
Dated: Saturday January 3 2004 - 19:28:13 GMT
There is no way to get either a single top or bottom border on the main menu with subimages.
So here's another route to the same end.
Can anyone help me on how to apply 2 javascript 4px backgrounds on and off to the bottom of the main menu items. I'm looking to get the 4px vertical-align:bottom with the rest transparent.
This code creates the 4px color in a table:
Code:
offfunction:
<script type="text/JavaScript" language="JavaScript">os='<table width="100%" cellpadding=0 cellspacing=0 border=0><tr height=4>';b=204;r=204;g=204;for(i=0;i<50;i++){(255>b)?os+="<td style='background:rgb(204,204,"+(b+=0)+")'> <\/td>":os+="<td style='background:rgb("+(r+=3)+","+(g+=3)+",255)'> <\/td>";}os+="<\/tr><\/table>";document.write(os);</script>
onfunction:
<script type="text/JavaScript" language="JavaScript">os='<table width="100%" cellpadding=0 cellspacing=0 border=0><tr height=4>';b=51;r=255;g=0;for(i=0;i<50;i++){(255>b)?os+="<td style='background:rgb(255,0,"+(b+=0)+")'> <\/td>":os+="<td style='background:rgb("+(r+=3)+","+(g+=3)+",255)'> <\/td>";}os+="<\/tr><\/table>";document.write(os);</script>
<script type="text/JavaScript" language="JavaScript">os='<table width="100%" cellpadding=0 cellspacing=0 border=0><tr height=4>';b=204;r=204;g=204;for(i=0;i<50;i++){(255>b)?os+="<td style='background:rgb(204,204,"+(b+=0)+")'> <\/td>":os+="<td style='background:rgb("+(r+=3)+","+(g+=3)+",255)'> <\/td>";}os+="<\/tr><\/table>";document.write(os);</script>
onfunction:
<script type="text/JavaScript" language="JavaScript">os='<table width="100%" cellpadding=0 cellspacing=0 border=0><tr height=4>';b=51;r=255;g=0;for(i=0;i<50;i++){(255>b)?os+="<td style='background:rgb(255,0,"+(b+=0)+")'> <\/td>":os+="<td style='background:rgb("+(r+=3)+","+(g+=3)+",255)'> <\/td>";}os+="<\/tr><\/table>";document.write(os);</script>
Persistant aren't I

Thanks,
maz