Form is displayed outside the dialog in Firefox

Form is displayed outside the dialog in Firefox

Hello, I have faced problem, please look into my code and say it's correct or not.

  1. <style>
    #dialog_link<?php echo $cnt; ?> {padding: .4em 0px .4em 0px; text-decoration: none; position: relative;}
    #dialog_link<?php echo $cnt; ?> span.ui-icon {margin: 0 5px 0 0; position: absolute; left: .2em; top: 50%; margin-top: -8px;}
    </style>

    <script language="javascript" type="text/javascript">
    $(document).ready(function()
    {
       $("#dialog<?php echo $cnt; ?>").dialog(
       {
          autoOpen: false,
          width: 600,
          height: 600,
          buttons:
          {
             "Ok": function()
             {
                $(this).dialog("close");
             }
          }
       });

       $('#dialog_link<?php echo $cnt; ?>, ul#icons li').hover(
       function() { $(this).addClass('ui-state-hover'); },
       function() { $(this).removeClass('ui-state-hover'); }
       );

       $('#dialog_link<?php echo $cnt; ?>').click(function()
       {
          $('#dialog<?php echo $cnt; ?>').dialog('open');
          return false;
       });
    });
































  2. </script>
  3. <div id="dialog<?php echo $cnt; ?>" title="title1" style="display:none; line-height:20px;">
  4.     text1
  5.    <div style="background:#FCC; border:1px solid red; text-align:center; height:30px; line-height:30px;">
  6.       wrong text 2
  7.    </div>
  8.    <a><font color="#0094CC">Submit Question</font></a><br />
  9.       <br /><font color="#FF0033">text 4</font><br />
  10.       <form name="questionform" method="post" action="doto.php">
  11.          text here
  12.          <textarea name="question" id="question" style="width:470px; height:50px;"></textarea><br /><br />
  13.       </form>
  14.    text end
  15. </div>

If code is correct then may be it's Firefox issue or jQuery...

Firefox 3.6.6 dont display correctly. IE and Chrome show correctly. Please look into attachments.

FF show half dialog correctly (firefox2.jpg show correct inside dialog) and half wrong (firefox1.jpg show bottom part of dialog on the main window). If I remove <form></form> then all correct.

Chrome.jpg is expected correct result. Form is inside dialog.

Please help me, how can i fix this for FF?