【问题标题】:align to right text of label (inline-block)对齐标签的右侧文本(内联块)
【发布时间】:2012-11-23 11:25:25
【问题描述】:

在本例中:http://jsfiddle.net/6L6ZL 是否可以在不指定 WIDTH 大小的情况下将标签文本右对齐?

<html>
<head>
<style>
fieldset {
display: inline-block;
}

fieldset input{
float: right;
}
</style>
</head>
<body>

<form>
<fieldset>
    <p><label>First Name</label><input type="text" /></p>
    <p><label>Second Name</label><input type="text" /></p>
    <p><label>Address</label><input type="text" /></p>
    <p><label>Age</label><input type="text" /></p>
</fieldset>
</form>

</body>
</html>

【问题讨论】:

    标签: forms size alignment css


    【解决方案1】:

    text-align:right; 添加到&lt;p&gt; 元素。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-08
      • 2021-08-28
      • 2012-04-06
      • 2021-06-13
      • 1970-01-01
      • 1970-01-01
      • 2016-09-26
      • 1970-01-01
      相关资源
      最近更新 更多