这个小提琴中心在页面上对齐内容:
http://jsfiddle.net/jbk7e0we/5/
如何对齐此内容,以便“输入文本”与“文本的大条目”右对齐。我已尝试使用align=right
但无效。
小提琴代码:
<div class="center">
<div style="display:inline-block; width:200px; align=right">Enter text</div>
<div style="display:inline-block; width:200px;"><input type = "text" size = "15"/></div>
<div style="block"></div>
<div style="display:inline-block; width:200px; align=right">Big entry for text</div>
<div style="display:inline-block; width:200px;"><input type = "text" size = "15"/></div>
</div>
.center {
margin-left: auto;
margin-right: auto;
width: 800px;
}
答案 0 :(得分:1)
将内联样式更改为text-align:right;
您的代码显示为
<div class="center">
<div style="display:inline-block; width:200px; text-align:right;">Enter text</div>
<div style="display:inline-block; width:200px;"><input type = "text" size = "15"/></div>
<div style="block"></div>
<div style="display:inline-block; width:200px; text-align:right;">Big entry for text</div>
<div style="display:inline-block; width:200px;"><input type = "text" size = "15"/></div>
</div>
.center {
margin-left: auto;
margin-right: auto;
width: 800px;
}
答案 1 :(得分:0)
变化:
RedirectToAction("Pay","Payment", model.Payment)
为:
JButton myButton = new JButton("<html>Compute b<sup>-1</sup> (mod a)</html>");
<强> jsFiddle example 强>
答案 2 :(得分:0)
您需要更改
align=right
到
text-align: right;
示例:
.center {
margin-left: auto;
margin-right: auto;
width: 800px;
}
<div class="center">
<div style="display:inline-block; width:200px; text-align: right;">Enter text</div>
<div style="display:inline-block; width:200px;">
<input type="text" size="15" />
</div>
<div style="block"></div>
<div style="display:inline-block; width:200px; text-align: right;">Big entry for text</div>
<div style="display:inline-block; width:200px;">
<input type="text" size="15" />
</div>
</div>
答案 3 :(得分:-1)
使用text-align: right;
而不是align: right