如何删除 jQuery UI 对话框中多余的 space
How to remove extra space inside of jQuery UI dialog box
这是我的对话框
我想删除或移除对话框内多余的空格。我怎样才能实现它?
更多详细信息,请点击我的 HTML
<div id="beneficiaries_window">
<?php
$sql1 = "SELECT * FROM beneficiary WHERE id = '$id'";
$result1 = mysql_query($sql1);
?>
<table style="border: 2px solid black;margin:auto;">
<tr>
<th><center>Name<center></th>
<th><center>Action</center></th>
</tr>
<?php
while($row1 = mysql_fetch_array($result1)){
echo "<tr class='beneficiaries_rows' id='".$row1['id']."'>";
echo "<td>".$row1['name']."</td>";
echo "<td>";
echo "<button class='edit_beneficiaries'>EDIT</button>";
echo "<button class='del_beneficiaries'>X</button>";
echo "</td><br/>";
echo "</tr>";
}
?>
</table>
</div>
<button class="beneficiaries" name="beneficiaries">Beneficiaries</button>
和jQuery脚本
jQuery("#beneficiaries_window").dialog({
modal: true,
resizable: false,
draggable: false,
autoOpen: false,
buttons:[{
text: "Close",
click: function(){
jQuery(this).dialog("close");
}
}]
});
//beneficiaries open dialog
jQuery(".beneficiaries").click(function(event){
jQuery("#beneficiaries_window").dialog("open");
event.preventDefault();
});
但在我的 firebug 中,我看到了这个 <br>'s
但它们在 <div>
[= 中没有 <br>
20=]
我怎么能删除这个我对这个额外的间距一无所知?
$('#div_id').dialog({
title : 'Add User',
position: { my: "center", at: "center", of: window },
width : 1000,
height : 500,
modal : true,
closeOnEscape: false
});
你可以在其中定义宽度,高度,相应地定义它的宽度。
之所以有额外的间距,是因为这个<br>
<?php
while($row1 = mysql_fetch_array($result1)){
echo "<tr class='beneficiaries_rows' id='".$row1['id']."'>";
echo "<td>".$row1['name']."</td>";
echo "<td>";
echo "<button class='edit_beneficiaries'>EDIT</button>";
echo "<button class='del_beneficiaries'>X</button>";
echo "</td><br/>"; <----THIS <br/> make the extra spacing
echo "</tr>";
}
?>
这是我的对话框
我想删除或移除对话框内多余的空格。我怎样才能实现它?
更多详细信息,请点击我的 HTML
<div id="beneficiaries_window">
<?php
$sql1 = "SELECT * FROM beneficiary WHERE id = '$id'";
$result1 = mysql_query($sql1);
?>
<table style="border: 2px solid black;margin:auto;">
<tr>
<th><center>Name<center></th>
<th><center>Action</center></th>
</tr>
<?php
while($row1 = mysql_fetch_array($result1)){
echo "<tr class='beneficiaries_rows' id='".$row1['id']."'>";
echo "<td>".$row1['name']."</td>";
echo "<td>";
echo "<button class='edit_beneficiaries'>EDIT</button>";
echo "<button class='del_beneficiaries'>X</button>";
echo "</td><br/>";
echo "</tr>";
}
?>
</table>
</div>
<button class="beneficiaries" name="beneficiaries">Beneficiaries</button>
和jQuery脚本
jQuery("#beneficiaries_window").dialog({
modal: true,
resizable: false,
draggable: false,
autoOpen: false,
buttons:[{
text: "Close",
click: function(){
jQuery(this).dialog("close");
}
}]
});
//beneficiaries open dialog
jQuery(".beneficiaries").click(function(event){
jQuery("#beneficiaries_window").dialog("open");
event.preventDefault();
});
但在我的 firebug 中,我看到了这个 <br>'s
但它们在 <div>
[= 中没有 <br>
20=]
我怎么能删除这个我对这个额外的间距一无所知?
$('#div_id').dialog({
title : 'Add User',
position: { my: "center", at: "center", of: window },
width : 1000,
height : 500,
modal : true,
closeOnEscape: false
});
你可以在其中定义宽度,高度,相应地定义它的宽度。
之所以有额外的间距,是因为这个<br>
<?php
while($row1 = mysql_fetch_array($result1)){
echo "<tr class='beneficiaries_rows' id='".$row1['id']."'>";
echo "<td>".$row1['name']."</td>";
echo "<td>";
echo "<button class='edit_beneficiaries'>EDIT</button>";
echo "<button class='del_beneficiaries'>X</button>";
echo "</td><br/>"; <----THIS <br/> make the extra spacing
echo "</tr>";
}
?>