SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    NN4 - CSS weirdest problem ever !!

    Hello,

    I am encountering the most frustrating thing in the world, that is a problem **totally** un-understandable. Check out the code below:

    Code:
    <style type="text/css">
        
        #navigation { position: absolute; top: 250px; left: 15px; visibility: visible; z-index:2 }
    	#date { position: absolute; top: 390px; left: 383px; visibility: visible}
        #affiche { position: absolute; top: 20px; left: 40px; visibility: visible}
    	#texte { position: absolute; top: 195px; left: 260px; visibility: visible}
    	#buttons { position: absolute; top: 130px; left: 300px; visibility: visible; z-index: 3}
    		
    </style>
    
    </head>
    
    <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="no">
    
    <? require("inc/background.inc"); ?>
    
    <div id="navigation" ><? include("inc/menu_programme.inc"); ?></div>
    
    <div id="date"><? include("inc/date.inc"); ?></div>
    
    <div id="affiche"><? include("inc/affiche.inc"); ?></div>
    
    <div id="buttons"><? include("inc/buttons_Programme_NN.inc"); ?></div>
    
    <div id="texte"><? include("inc/texte_programme.inc"); ?></div>
    The navigation include inserts a navigational menu. (you can actually see it working at www.jvgl.com - the menu on the left bottom)

    It works fine with NN4. But if I do change only ONE letter of the "navigation" identifier (say, navigatio, or avigation) in both the styles and the code (meaning it is the same everyplace), I get a Javascript error when I mouse over my jpeg.

    Well, I spent 3 hours figuring that error. I am dried up.

    Has anyone some wet ideas?

    Thanks a real bunch.

  2. #2
    SitePoint Zealot ChrisOSX's Avatar
    Join Date
    May 2002
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Let's see the JavaScript

    Can you post the JavaScript? Maybe there is a problem with it, not the CSS?

  3. #3
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the javascript:

    [VBS]function elbaz(imgName) {
    imgOn = eval (imgName + "on.src");
    if(document.layers)
    {
    document.navigation.document[imgName].src = imgOn;
    }
    else if(document.all)
    {
    document[imgName].src = imgOn;
    }
    else
    {
    window.document[imgName].src= imgOn;
    }

    }

    function unelbaz(imgName) {
    imgOff = eval (imgName + "off.src");
    if(document.layers)
    {
    document.navigation.document[imgName].src = imgOff;
    }
    else if(document.all)
    {
    document[imgName].src = imgOff;
    }
    else
    {
    window.document[imgName].src= imgOff;
    }

    }[/VBS]

    and here is the code of the menu calling it:

    [VBS] <table width="116" border="0" cellspacing="0" cellpadding="0" height="156">
    <tr>
    <td width="30"><img name="accueil" src="images/ongletC.gif" width="30" height="26" border="0"></td>
    <td width="86"><img src="images/accueil_over.jpg" width="86" height="26" border="0"></td>
    </tr>
    <tr>
    <td width="30"><img name="pic1" src="images/ongletA.gif" width="30" height="26"></td>
    <td width="86"><a href="enbref.php" onMouseOver="elbaz('pic1');"
    onMouseOut="unelbaz('pic1');"><img src="images/enbref.jpg" width="86" height="26" border="0"></a></td>
    </tr>
    <tr>
    <td width="30"><img name="pic2" src="images/ongletA.gif" width="30" height="26"></td>
    <td width="86"><a href="programme.php" onMouseOver="elbaz('pic2');"
    onMouseOut="unelbaz('pic2');"><img src="images/programme.jpg" width="86" height="26" border="0"></a></td>
    </tr>
    <tr>
    <td width="30"><img name="pic3" src="images/ongletA.gif" width="30" height="26"></td>
    <td width="86"><a href="exposants.php" onMouseOver="elbaz('pic3');"
    onMouseOut="unelbaz('pic3');"><img src="images/exposants.jpg" width="86" height="26" border="0"></a></td>
    </tr>

    etc.etc. [/VBS]

    Thanks for your help !

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's working right, why change it?

    If you're really having problems make sure all your code is on the same page, then do a find and replace for "x" where "x" is the word you want to replace.

    That way, all instances of that word get replaced 100%.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

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