Still stuck on border and parse error

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Still stuck on border and parse error

Post by Maz »

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
JMM
Advanced
Advanced
Posts: 13
Joined: Tue Nov 11, 2003 10:47 pm

Post by JMM »

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

<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.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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

maz
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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

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)+")'>&nbsp;<\/td>":os+="<td style='background:rgb("+(r+=3)+","+(g+=3)+",255)'>&nbsp;<\/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)+")'>&nbsp;<\/td>":os+="<td style='background:rgb("+(r+=3)+","+(g+=3)+",255)'>&nbsp;<\/td>";}os+="<\/tr><\/table>";document.write(os);</script>
Persistant aren't I :D


Thanks,

maz
Post Reply