开发者

Format Validation Summary

All I want to do is an Image to the validation summary and format the hearder text in the validation summary. This is for IE.

    .validationSummary{border:1px solid black; margin-bottom:7px;}
开发者_运维问答    .validationSummary ul{ color:black; list-style-type: square;}


<asp:ValidationSummary ID="ValidationSummary" runat="server" BackColor="LightGray" DisplayMode="BulletList" CssClass="validationSummary" EnableClientScript="true" meta:resourcekey="ValidationSummaryResource"/>

So basically all I need is a way to add an icon to the validation summary and access the hearder css porperties.

Can I access the header like this: .validationSummary.HeaderText{color:Black;} IT does not seem to be working.


You can add the Header like this:

 <asp:ValidationSummary ID="ValidationSummary" HeaderText ="<span>the following fields require your attention</span>"/>

css:

.validation_summary{
    background: url(/image.png) no-repeat left;
}


Give the UL some padding, a background image and set the background image to display top left.

something like

.validationSummary ul{
     padding-left: 50px;
     background: url(your image) no-repeat fixed left top;
}

This should match your design with enough tweeking.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜