I am trying to align 2 elements in the same line next to each other, but having hard time. And i know this is kind of a simple question that can be googled. But i simply can't seem to do it.
Here is the code –
<div>
<c:PF_InputCheckbox id="pf_nhw_contractor_submit_acknowledged" value="{!v.acknowledged}"/>
I affirm I have read and understand the policy.
</div>
The component c:PF_InputCheckbox is that checkbox thingy seen here. I want the text right next to it, not below it.
I have tried assigning class slds-show_inline-block to container div, but it still shows the checkbox and the text in two separate lines.
Best Answer
There are several ways of doing this. One of them would be using an slds grid
would render the following:
you can then chose to align your text to the left, or right, again using slds. I encourage you to read the the SLDS documentation and or to do the SLDS Trailhead Module to expand your knowledge on the subject.