JqueryMobile checkbox unlike "data-inline"

I am developing a web application with MVC 3 / Razor and jquery-mobile. In jquery-mobile, you can usually add data_inline = "true"to the attributes of an object, and this will prevent the element from stretching across the screen, for example:

@Html.DropDownListFor(m => m.value, options, new { data_inline = "true" })
@Html.ActionLink("Text", "Action", null, new {data_role="button", data_inline="true"})

Both of them work fine. But on the flag ...

@Html.CheckBoxFor(m => m.value, new { data_inline = "true" })

... he does nothing, and I still get a nasty stretched flag. Adding data_role="button"does not help (not what I expected from him).

Is there a reason why this is so? Any good way I can get my checkbox to not stretch without resorting to manual CSS changes?

+3
source share
1 answer

jQM data-inline. , , label CSS display inline-block.

<label class="inline">
    <input type="checkbox" name="chk0" class="ui-btn-inline" />Check me
</label>

.inline {
    display: inline-block !important;
}
+5

All Articles