以下示例中的颜色与解决方案无关,但在调试中很有用。我的意思是说他们在工作...但是右对齐仅对.rollup有效,而对余额字段无效。
这是我通过webresources js和CSS应用的CSS:
.rollup
{
text-align: right!important;
background: #FF6347; /* orange/red */
}
#hnc_supplierclaimcustomersocialbalance
{
text-align: right!important;
background: #FFFF00; /* yellow */
}
.rollup中的字段变为颜色#FF6347。平衡背景确实变黄。但是,实际上只有#FF6347右对齐,而天平则保持左对齐。
当我在浏览器中打开并按F12时,这是相关的HTML:
<tr height="24">
<td class="ms-crm-ReadField-Normal ms-crm-FieldLabel-LeftAlign" id="hnc_supplierclaimcustomersocialbalance_c" title="Sum of Customer Social Claims - Sum of Payments"><span class="ms-crm-InlineEditLabel" id="hnc_supplierclaimcustomersocialbalance_cl_span"><span class="ms-crm-InlineEditLabelText" id="hnc_supplierclaimcustomersocialbalance_cl" style="max-width:115px;text-align:Left;">Balance</span>
<div class="ms-crm-Inline-GradientMask">
</div>
</span>
</td>
<td class="ms-crm-Field-Data-Print ms-crm-Field-Number-Print" data-height="24" id="hnc_supplierclaimcustomersocialbalance_d" title="$2,250.00">
<div id="hnc_supplierclaimcustomersocialbalance" data-attributename="hnc_supplierclaimcustomersocialbalance" data-formid="bee8c7df-4ce7-451b-8e35-48757f5bab1e" data-fdeid="PrimaryEntity" data-layout="0" tabindex="1430" dir="ltr" class="ms-crm-Inline-Chrome money ms-crm-Inline-Chrome nvarchar" aria-describedby="hnc_supplierclaimcustomersocialbalance_c">
<div class="ms-crm-Inline-Value ms-crm-Inline-Locked">
<label for="hnc_supplierclaimcustomersocialbalance_label" id="Balance_label">
<div class="ms-crm-div-NotVisible">Balance $2,250.00</div>$2,250.00
<div class="ms-crm-Inline-GradientMask"></div>
</label><span><div class="ms-crm-Inline-GradientMask"></div></span>
</div>
<div class="ms-crm-Inline-Edit ms-crm-Inline-Currency" style="display: none;">
<table id="hnc_supplierclaimcustomersocialbalance_i_table" cellpadding="0" cellspacing="0" dir="ltr" class="ms-crm-CurrencyTable-Refresh" style="background-color: rgb(255, 255, 255);">
<tbody>
<tr>
<td class="ms-crm-CurrencySymbol-Refresh"><span id="hnc_supplierclaimcustomersocialbalance_i_symbol" class="ms-crm-Money-CurrencySymbol">$</span></td>
<td>
<div style="white-space: normal;">
<input type="text" id="hnc_supplierclaimcustomersocialbalance_i" attrname="hnc_supplierclaimcustomersocialbalance" class="ms-crm-Money ms-crm-InlineInput" aria-labelledby="hnc_supplierclaimcustomersocialbalance_c">
</div>
</td>
</tr>
</tbody>
</table>
</div><span class="ms-crm-Inline-LockIcon" id="hnc_supplierclaimcustomersocialbalance_lock" style="display: block;"><img src="/_imgs/imagestrips/transparent_spacer.gif" class="ms-crm-ImageStrip-inlineedit_locked" alt=""></span><span id="hnc_supplierclaimcustomersocialbalance_warnSpan" class="ms-crm-Inline-WarningIcon" title="" style="display: none;"><img src="/_imgs/imagestrips/transparent_spacer.gif" class="ms-crm-ImageStrip-inlineedit_warning" alt="Error" id="hnc_supplierclaimcustomersocialbalance_warn"><div id="hnc_supplierclaimcustomersocialbalance_w" class="ms-crm-Hidden-NoBehavior"></div></span>
</div>
</td>
</tr>
有人知道我的余额字段为什么不右对齐吗?