View Full Version : Javscript Menu and CSS
01-21-2005, 11:09 PM
This line of code:
<link href="[path to css file here]" type="text/css" rel="stylesheet">
is causing a JS/DHTML nav menu to load incorrectly. The menu is about 3 times as wide as I specified in my config file, and the background colors are all white.
I was wondering if anyone knew why the CSS link is throwing off my code.
01-21-2005, 11:42 PM
Well If you could show an actual example of this it would be very helpful because if used correctly that line of code should cause no problems. The style sheet that is linking to or improper use of that tag could cause a problem like this. The tag itself should be in the head of the document (<head> </head>) and should be before the body tag etc etc. Anyways an example is needed.
01-22-2005, 12:01 AM
Sorry. I was still working on the example.
Here it is:
Now when I put it on the web, it has JS Error, 'menus' are undefined
This should probably go in dynamic drive area, as this is a DD script...
If you change the first "table" in "main.css" to be ".mytable" and then assign the class ".mytable" to the table in your HTML this will make you understand better what I mean.
Use class names in your HTML and CSS files instead of referring to global TAGS. For more info visit the CSS/HTML forum.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.