Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts

    Post Javscript Menu and CSS

    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.

    Sincerely,

    Dan Barr

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.

    One note, this thread really should be in html/css forum as this has nothing to do with javascript but rather html/css.
    Kris Hubby
    kwhubby site

  • #3
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Sorry. I was still working on the example.

    Here it is:

    http://www.robowhizards.com/examples

    Now when I put it on the web, it has JS Error, 'menus' are undefined

    Dan

    This should probably go in dynamic drive area, as this is a DD script...

  • #4
    New Coder
    Join Date
    Nov 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There are no Javascript ERRORS in this example.

    The link to the external "main.css" is just screwing up the layout since the content of "main.css" overrides the definition of all the table/tr/td TAGS in the HTML, including the Javascript dynamically generated menu which are tables/tr/td themselves.

    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.

    Caio


  •  

    Posting Permissions

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