【问题标题】:Vertical-align element in divdiv中的垂直对齐元素
【发布时间】:2017-01-08 04:01:41
【问题描述】:

我有一个带有 css 的 div:

.row
{
width: 100%;
margin-bottom: 3px;
padding: 5px;
border-radius: 7px;
background-color: #F3F3F3;
text-align: right;
min-height: 20px;
}

并为 span 使用样式:

  .rowtitle
{
display: inline-block;
border-radius: 5px;
background-color: white;
padding: 3px;
margin-left: 5px;
width: 55px;
}

在 html 中,我使用它。

   <div class="row" style="vertical-align:top">
    <span class="rowtitle" style="width:85px">جنسیت  </span>
       <asp:RadioButtonList ID="jensiatRadioButtonList" runat="server" RepeatDirection="Horizontal" >
         <asp:ListItem Selected="True" Value="1">مرد</asp:ListItem>
         <asp:ListItem Value="0">زن</asp:ListItem>
       </asp:RadioButtonList>
   </div>

但是当我的控件宽度很大时,设置为 div 的底部。

当我使用单选按钮时,它设置了 div 的底部。

我想将元素设置到 div 的顶部。

【问题讨论】:

    标签: asp.net html


    【解决方案1】:

    float:right;clear:both 添加到.rowtitle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-02
      • 2010-09-09
      • 2015-12-14
      • 1970-01-01
      • 2011-11-22
      相关资源
      最近更新 更多