views:

1197

answers:

2

Hi, i need a help with thickbox. I use it in my website, but a function of overflow:hidden, dont work in firefox, just in IE. Someone can helpme? thanks...

html and css no problem, my problem is thickbox, becausa it work in IE 6 or 7, but no in mozilla(all versions). look the code;

function tb_show(caption, url, imageGroup, leg, ttlTb) {//function called when the user clicks on a thickbox link
    try {
     if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
      $("body","html").css({height: "100%", width: "100%"});
      $("html").css("overflow","hidden");     <!-- JUST IN IE6 -->
      if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
       $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
       $("#TB_overlay").click(tb_remove);
      }
+1  A: 

First off, it really helps if we can see the html/css that's causing the problem as well as an explanation of how it's not working.

Secondly, install the firebug extension. open firebug (F12) and Inspect the element you're concerned about. Look at the Style section on the right to see what styles are actually being applied.

edit:

rather than set overflow: hidden on html, try setting that on body... or better yet, on a div containing all other elements

Jonathan Fingland
You can even use firebug to change the styles in real-time to figure out what needs to be changed to get your code to work.
Donal Boyle
A: 

look the code uphead