我无法将标签和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);
}


你能帮我吗 ??

最佳答案

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

09-27 02:01