Shanthamma DS
Shanthamma DS

Reputation: 49

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,

 <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?

Upvotes: 0

Views: 100

Answers (4)

Bishoy Bisahi
Bishoy Bisahi

Reputation: 377

You can use this:

#submitExpectedJ0 {
    float:right;
}

Upvotes: 0

zainab .a.k
zainab .a.k

Reputation: 23

#id {
float:right;

}

this should work i run my css on firefox and it works!

Upvotes: 0

FDavidov
FDavidov

Reputation: 3675

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. 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.

Upvotes: 1

John Slegers
John Slegers

Reputation: 47081

This should do it :

.dijit {
    float: right;  
}
<span class="dijit dijitReset dijitInline dijitButton dijitButtonHover dijitHover" role="presentation" widgetid="submitExpectedJ0">To right</span>

Upvotes: 0

Related Questions