[英]button alignment in css
I have declared the button as, 我已将按钮声明为
<button id='submitExpectedJ0' type='button'></button>
I need to align it to right, i tried with 我需要将其调整到正确的位置,我尝试过
style= 'float: right;'
on the widget ID it didnt work, In chrome its shown as, 在小部件ID上无效,在chrome中显示为,
<span class="dijit dijitReset dijitInline dijitButton dijitButtonHover dijitHover" role="presentation" widgetid="submitExpectedJ0">
May be the style is overriden by this class. 可能是该类覆盖了样式。
How to align the button to right? 如何将按钮向右对齐?
Try to wrap your button in a div
or span
, setting the width of the div
/ span
to 100% and include text-align:right
as part of the style. 尝试将按钮包装在
div
或span
,将div
/ span
的宽度设置为100%,并在样式中包括text-align:right
。 something like: 就像是:
<div style="width:100%;text-align:right">
<button id='submitExpectedJ0' type='button'></button>
</div>
The float;right
may also work once you have the wrapping included. 附带包装后,
float;right
也可能起作用。
You can use this: 您可以使用此:
#submitExpectedJ0 {
float:right;
}
This should do it : 这应该做到这一点:
.dijit { float: right; }
<span class="dijit dijitReset dijitInline dijitButton dijitButtonHover dijitHover" role="presentation" widgetid="submitExpectedJ0">To right</span>
#id {
float:right;
} }
this should work i run my css on firefox and it works! 这应该工作,我在Firefox上运行我的CSS,它的工作原理!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.