Why not use lightning:layout like so:
<lightning:layout multipleRows="true" verticalAlign="end">
<lightning:layoutItem size="12" smallDeviceSize="12" mediumDeviceSize="1" largeDeviceSize="1" padding="around-small"/>
<lightning:layoutItem size="12" smallDeviceSize="10" mediumDeviceSize="8" largeDeviceSize="8" padding="around-small">
<div class="slds-form-element">
<label class="slds-form-element__label">Enter Expense Value</label>
<div class="slds-form-element__control">
<ui:inputNumber class="slds-input"/>
</div>
</div>
</lightning:layoutItem>
<lightning:layoutItem size="12" smallDeviceSize="2" mediumDeviceSize="2" largeDeviceSize="2" padding="around-small">
<lightning:button class="slds-button slds-button--neutral slds-input__icon--right" label="Create" onClick="{!c.createExpense}"/>
</lightning:layoutItem>
<lightning:layoutItem size="12" smallDeviceSize="12" mediumDeviceSize="1" largeDeviceSize="1" padding="around-small"/>
</lightning:layout>
Pay attention to verticalAlign="end"
which pushes the button to the bottom and aligns with the input box, otherwise it will try to align with your label.
But, if you want to stick to your original design, here a way to do it:
<div class="slds-grid slds-grid--wrap">
<div class="slds-size_1-of-12"></div>
<div class="slds-size_10-of-12">
<fieldset class="slds-form-element slds-form_compound">
<div class="slds-form-element__control">
<div class="slds-form-element__group">
<div class="slds-form-element__row">
<div class="slds-form-element slds-size_1-of-2">
<label class="slds-form-element__label">Enter Expense Value</label>
<div class="slds-form-element__control">
<ui:inputNumber class="slds-input"/>
</div>
</div>
<div class="slds-form-element slds-size_1-of-2">
<lightning:button class="slds-button slds-button--neutral slds-input__icon--right" label="Create" onClick="{!c.createExpense}"/>
</div>
</div>
</div>
</div>
</fieldset>
</div>
<div class="slds-size_1-of-12"></div>
</div>
You can refer to this for further clues.
--
slds elements are deprecated and may not work in Winter '19 or in the future. Change them to_
, such asslds-form_horizontal
andslds-size_1-of-12
. – sfdcfox Oct 8 '18 at 19:22