1

ASP.NET は、ラジオ ボタンのリストを、次のように、セルに入力を含むテーブルの行としてレンダリングします。

    <table id="sites">
    <tr>
        <td>
           <input id="sites_11" type="radio" name="sites" value="1583" />
          <label for="sites_11">This is a very long site name including city and state</label>
         </td>

    </tr>
          .
          .
          <snip>
    </table>

入力 ( ) とそのラベルの間にスペースを作成しようとしています。

    ( )This is the beginning of a long label

これになります:

    ( )  This is the beginning of a long label

また、ラベルが非常に長く、折り返されるものが多いため、() の下で折り返さないようにしたいと考えています。私はそれが次のように見えることを望みます:

    ( ) This is a very long label for the site which includes
        the city and state 

このようではありません:

       ( ) This is a very long label for the site which includes 
       the city and state 

それはどのように達成されますか?

4

1 に答える 1

0

CSS クラスを作成して、それを radiobuttonlist に適用し、目的の書式設定を含むラベル サブクラスを使用することができます。何かのようなもの:

.yourradioliststyle label {
padding-left:5px;

}

于 2015-01-09T21:00:54.373 に答える