HTML ignores my div

CooterR

New Member
I have this HTML file which has some divs in it. A strange thing is happening with them though. Whenever I put something out of \[code\]<div id="container">\[/code\], that element is being ignores for selecting. I can't select text, click links etc. outside \[code\]<div id="container">\[/code\].There is some Javascript included with the template, but since I'm not very familiar with JS I can't spot a problem there, and I also tried messing around with the CSS, but still the same: Anything outside \[code\]<div id="container">\[/code\] can't be selected or clicked, but can be seen!EDIT: I got this from Mozilla Firefox's error log:\[code\]Timestamp: 10/8/2012 3:48:59 PMWarning: Empty string passed to getElementById().Source File: http://site.com/rules.phpLine: 162\[/code\]Here is my file:\[code\]var target_fragment = '';/* Highlight link target if the visitor arrives at the page with a # */function highlight_load(){ frag_highlight(location.hash.substring(1));}/* Highlight link target from an onclick event after unhighlighting the old one */function frag_highlight(frag){ var fragment = document.getElementById(frag); if (target_fragment.length > 0 && document.getElementById(target_fragment)) { document.getElementById(target_fragment).className = 'divide'; } if (frag.length > 0 && fragment) { target_fragment = frag; fragment.className = 'fragment divide'; }}/* Add onclick events to all <a> with hrefs that include a "#" */function onclick_highlight(){ if (document.getElementsByTagName) { var alinks = document.getElementById('rules').getElementsByTagName('a'); for (i = 0; i < alinks.length; i++) { if (alinks.getAttribute('href').indexOf('#') >= 0) { var fragment = alinks.getAttribute('href').substring(alinks.getAttribute('href').indexOf('#') + 1); var e_onclick_function = "frag_highlight('" + fragment + "')"; var new_function = new Function('e', e_onclick_function); alinks.onclick = new_function; } } }}/* Load the script */window.onload = function() { highlight_load(); onclick_highlight();};// ]]></script><div id="extras"> <div class="mini-panel"> <div class="inner"><span class="corners-top"><span></span></span> <h3>Sections</h3> <ul class="menu"> <li><a href="http://stackoverflow.com/questions/12782921/#rule1">Something</a></li> <li><a href="http://stackoverflow.com/questions/12782921/#rule2">Something</a></li> </ul> <span class="corners-bottom"><span></span></span></div> </div></div><div id="container"> <div id="main"> <h2 class="imgrep community">Rules</h2> <p class="explain_rules">These are the board rules</p> <ol id="rules"> <li id="rule1"> <h3>Rules</h3> <ol> <li>Something</li> <li>Something</li> <li>Something</li> </ol> </li> </ol> </div></div>\[/code\]
 
Back
Top