height() in Firefox

height() in Firefox

Hello
I have a problem in Firefox and Opera
I give an example:
HTML

  1. <!-- Start Master Mijloc -->
     <div class="DGC_CasutaMijlocMasterBody" style="width:500px;">
      <div class="DGC_CasutaMijlocSt"></div>
      <div class="DGC_CasutaMijlocMj"  style="width:500px;">
       <div  style="width:500px;">
         Content Content Content Content Content Content Content Content Content Content 




  2. Content Content Content Content Content Content Content Content Content Content Content 
  3. Content vContent Content Content Content 
  4. Content Content Content Content Content Content 
  5. Content Content Content Content Content 
  6. Content Content Content Content Content Content 
  7. Content Content Content Content Content 
         <div style="clear:both"></div>
       </div>
      </div>
      <div class="DGC_CasutaMijlocDr"></div>
     </div>
     <!--End Start Master Mijloc -->





CSS

  1. /* Body */

    .DGC_CasutaMijlocMasterBody div

    {

    float:left;

    }

    .DGC_CasutaMijlocSt

    {

    width:18px;

    background: url("../img/casuta/DGC_MijlocSt.png") repeat-y ;

    }

    .DGC_CasutaMijlocMj

    {

    background: #ffffff;

    margin:auto;

    }

    .DGC_CasutaMijlocMj div

    {

    color:#000000;

    }

    .DGC_CasutaMijlocDr

    {

    width:24px;

    background: url("../img/casuta/DGC_MijlocDr.png") repeat-y ;

    }


Layer middle increases its size depending on content instead layer on right and the left does not increase the size of fact for which I made a function of size two layer

  1. function

    RerizeDiv() {

    //

    if($(".DGC_CasutaMijlocMasterBody").length >0 ) {

    z=$(

    ".DGC_CasutaMijlocMj").length

    for(x=0;x<z;++x) {

    m=$(

    ".DGC_CasutaMijlocMasterBody:eq("+x+")").height();

    $(

    ".DGC_CasutaMijlocSt:eq("+x+")").height(m)

    $(

    ".DGC_CasutaMijlocDr:eq("+x+")").height(m)

    }

    }

    }

In Internet explorer works fine but not Firefox or Opera. If you introduce other layers in the middle or formatted text or commands using padding or margin, resulting difference is calculated eg
if auto resize to 100px and I have a 10px padding-top
in Firefox look like 100 in InternetExplorer look like 110

so where is the problem

Tnx