Hi there!
Info : Jquery-UI 1.8.4 (Tested and same effect on 1.8.6).
I got a page with nothing too fancy, a table to locate areas and some forms. Something like:
A header on top, a menu, and then a toolbar (understand a <td> with buttons inside) and an image on the right:
Header |
Menu |
Toolbar
|
Image
|
This contained exactly is the user screen (no scrollbars).
I needed to use a modal dialog so I used the code to the bottom of this post.
My problem is that when the page is rendered even before I open the dialog, a white space has been added under my (Toolbar/Image) and has the same height as my hidden dialog ....
I really need to rid this space from my page.
I tried to :
* Use position:absolute;top:0px;left:0px to my div
* Modify .ui-dialog in CSS to position:fixed
* Encapsulate my div in another div with : width:0px;height:0px:overflow:hidden
All this do nothing.
* I also tried to create an iframe and put my div inside, this work for the white space but my dialog won't show outside of the frame :D
I'm a bit stuck, any help appreciated!
- $("#condamnationRemoveDialog").dialog({
- autoOpen: false,
- height: 300,
- width: 450,
- modal: true,
- ...
- });
-
- // Date picker
- $(function() {
- $.datepicker.setDefaults($.datepicker.regional['fr']);
- $( "#condamnDateDepose" ).datepicker();
- $( "#condamnDateDepose" ).datepicker( "option", "dateFormat", <?php echo "'".$_SESSION["DATEPICKER_DISPLAY_DATE"]."'"?>);
- });
- </script>
- <!-- Depose dialog -->
- <div id="condamnationRemoveDialog" title="Supprimer une condamnation" style="display: none;">
- <form>
- <input type='hidden' value = '' id='idToRemove'/>
- <table border="0">
- <tr>
- <td>
- <label for="condamnDateDepose">Date de dépose</label>
- </td>
- <td>
- <input type="text" name="condamnDateDepose" id="condamnDateDepose" class="ui-widget-content ui-corner-all" style="width: 150px;" readonly="readonly"/>
- </td>
- </tr>
- </table>
- </form>
- </div>