Niloo
Niloo

Reputation: 1215

Vertical-align element in div

I have a div with css :

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

and use a style for span :

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

In html, i use it.

   <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>

but when my control width is big span set to bottom of div.

and when i use a radiobutton, it set botton of div.

I want set element to top of div.

enter image description here

Upvotes: 0

Views: 1493

Answers (1)

YardenST
YardenST

Reputation: 5257

add float:right;clear:both to the .rowtitle

Upvotes: 1

Related Questions