开发者

Twitter Bootsrap HTML/CSS layout and working with radio boxes

开发者 https://www.devze.com 2023-04-04 17:28 出处:网络
so using the twitter bootstrap CSS framework, if you display this html it will show with the text under the radio button, i want them to show to the right * or left of the radio button

so using the twitter bootstrap CSS framework,

if you display this html it will show with the text under the radio button, i want them to show to the right * or left of the radio button

this works if you replace Gender with Gender it will have the desired effect

however i do not have control over changing the tag to a span tag (im using a java based framework)

however i can prefix and suffix the html - shown in the example below

                @@@@@@@@ ADD PREFIX HTML @@@@@@@@@@@@<input type="radio" checked name="optionsRadios"  value="option1" />
                <label>Gender</label>@@@@@@@ADD ADD SUFFIX THML @@@@@@@@@@@开发者_Go百科@

ur a wizard if you can get this working!, thanks guys


      <div class="clearfix">
        <label id="optionsRadio">Gender</label>

        <div class="input">
          <ul class="inputs-list" wicket:id="gender">
            <li>
              <label>
                <input type="radio" checked name="optionsRadios"  value="option1" />
                <label>Gender</label>
              </label>
            </li>

            <li>
              <label>
                <input type="radio" name="optionsRadios" value="option2" />
                <label>Gender</label>
              </label>
            </li>
          </ul> 
        </div>


The radio buttons on the bootstrap demo page render as you expect so there is either something in your own CSS causing this or a problem with your markup.

My guess is that the problem is because you have your radio buttons and your labels nested inside another label. Try removing the wrapper label and see if that works.


The label element must not have any nested label elements.

0

精彩评论

暂无评论...
验证码 换一张
取 消