0

我无法在一行中对齐标签和 Ajax Rating Control。

代码是,

<label class="Informlabel" style="font-size: 13px; font-weight: bold; float: left;
                width: 100%; overflow: auto; display: block; vertical-align: top;">
                Rating :</label>
<asp:Rating ID="Rating1" runat="server" MaxRating="5" CurrentRating="0" CssClass="ratingStar"
                    StarCssClass="ratingItem" WaitingStarCssClass="Saved" FilledStarCssClass="Filled"
                    EmptyStarCssClass="Empty" AutoPostBack="false">
                </asp:Rating>

这是评级工具的CSS

li 
{
      clear:both;
      margin-bottom:1em;
      border-bottom:1px solid #eee;
}
/* ****************** RatingStar ****************** */
.ratingStar
{
      white-space:nowrap;
      margin:1em;
      height:17px;
      vertical-align:top;
}
.ratingStar .ratingItem {
    font-size: 0pt;
    width: 20px;
    height: 16px;
    margin: 0px;
    padding: 0px;
    display: inline-block;
    background-repeat: no-repeat;
    cursor:pointer;
}
.ratingStar .Filled {
    background-image: url(Images/Rating/Selected.gif);
}
.ratingStar .Empty {
    background-image: url(Images/Rating/Empty.gif);
}
.ratingStar .Saved {
    background-image: url(Images/Rating/Hover.gif);
}

你能帮我吗 ??

4

1 回答 1

0

这是因为您的标签上有 display:block,它应该display: inline-block;与 Ajax Rating Control 的输出相同

于 2012-10-09T12:54:46.497 回答