c# - 在单行中对齐标签和 Ajax 评级控件

标签 c# asp.net html css alignment

我无法在一行中对齐标签和 Ajax 评级控件。

代码是,

<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,它应该是 display: inline-block; Ajax Rating Control 的输出相同

关于c# - 在单行中对齐标签和 Ajax 评级控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12800426/

相关文章:

c# - 防止出现未处理的异常对话框

c# - 通用类型的集合

javascript - 单击某个按钮时不显示弹出模式

从服务器呈现时,html 页面宽度不同

html - 基于同级属性的XPath

html - 悬停下拉菜单不显示

c# - 当自定义控件的子项及其属性发生更改时,如何重新呈现自定义控件?

c# - XAML-如何动态设置 ScrollViewer 的大小?

c# - Ajax ModalPopUp Extendar 在执行后面代码中的前几行之前弹出

c# - ASP.NET Unicode 字符串显示不正确