开发者

how to set radio button text(caption) to center

**VB.NET 2010 , ASPNET ******开发者_如何转开发*

Hi,

Is there a way to set the radio button text to center, I want to show it on the top of radiobutton hole..thanks


The text and the radio button are separate, so you can style them any way you like. Example:

HTML:

<label class="CenteredRadio">
  <span>Click me</span>
  <input type="radio" name="group" value="yes" />
</label>

CSS:

.CenteredRadio { width: 300px; }
.CenteredRadio span { display: block; text-align: center; }
.CenteredRadio input { display: block; text-align: center; }

If you are using a RadioButton control, set it's text to an empty string, and you can use your own text.


Set the Text of the RadioButton to String.Empty. Add a Label to the top of it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜