我正在使用jQuery UI对话框在我的页面上弹出一些补充信息。但在Chrome 11和Firefox 4中,标题栏过高,这看起来非常不合适。而在IE 9中却没有问题。这是它的截图:
我尝试手动设置标题栏的高度,但只改变了标题栏的颜色区域大小,并未调整标题文本或段落文本的位置。在Chrome开发者工具中检查也没有发现奇怪的边距或填充可能引起此问题。有谁知道是什么原因引起的吗?以下是此对话框的脚本和标记。据我所知,除了标准的jQueryUI CSS之外,没有应用特殊的CSS样式于此对话框(如果这很重要,则使用ASP.Net / C#以及jQuery 1.5.2和jQueryUI 1.8.12。
ASP / HTML:
<!-- ssn -->
<div class="input-block">
<asp:Label ID="lblSsn" runat="server" CssClass="input-label" AssociatedControlID="tbSsn">Social Security Number (<a id="show-ssn-disclosure" href="#">More Info</a>)</asp:Label>
<asp:TextBox ID="tbSsn" runat="server" CssClass="input" />
<div id="ssn-disclosure-text">
<p>SSN disclosure is <strong>highly recommended</strong> if you have one. The University is required by federal law to report your SSN and other pertinent information
to the Internal Revenue Service pursuant to the reporting requirements imposed by the Taxpayer Relief Act of 1997. The University will use the SSN you provide to
verify the identity of each applicant, to link to the Payroll Office to verify amounts paid to students receiving teaching assistantships and research assistantships,
and to link financial awards and admission data to registration histories and student records. This record-keeping system was established before January 1, 1975,
pursuant to the authority of the Regents of the University of California under Article IX, Section 9 of the Constitution of the State of California. This notification
is provided to you as required by the Federal Privacy Act of 1974.</p>
</div>
</div><!--/input-block-->
脚本:
$(function() {
//hide ssn disclosure dialog box
var $ssnDialog = $('#ssn-disclosure-text').hide().dialog({
autoOpen: false,
resizable: false,
modal: true,
width: 500,
title: 'SSN Disclosure'
});
//binding for ssn disclosure dialog
$('#show-ssn-disclosure').click(function(e) {
e.preventDefault();
$ssnDialog.dialog('open');
});
});
任何可行的修复建议将不胜感激。
float:left;
。我不知道为什么这会导致问题,但是删除它解决了这个问题。我将接受你的答案,因为你帮助我找到了正确的方向。 - Ender