You need to sign in to do that
Don't have an account?
vinny r
Salesforce lightning component ignoring the styling
Hi,
I am starting my salesforce lightning component framework superbadge and I have written the below code. I am using the component in a lightning app and using the preview for testing. Can you please let me know why the dropdown menu and buttons are not aligned properly.
Code
<aura:component >
<aura:attribute name="attr_selectTypeBoat" type='String[]' default='All Types'/>
<lightning:layout horizontalAlign="center">
<lightning:layoutItem flexibility="auto" padding="around-small" >
<lightning:select aura:id="selectTypeBoat" name="selectType" label='Please select'>
<aura:iteration items='{!v.attr_selectTypeBoat}' var='option'>
<option value='{!option}' text='{!option}' />
</aura:iteration>
</lightning:select>
</lightning:layoutItem>
<lightning:layoutItem flexibility="auto" padding="around-small" >
<lightning:button label="Search" variant="brand"/>
</lightning:layoutItem>
<lightning:layoutItem flexibility="auto" padding="around-small">
<lightning:button label="New" variant="neutral"/>
</lightning:layoutItem>
</lightning:layout>
</aura:component>
Output
Thanks
Vinny
I am starting my salesforce lightning component framework superbadge and I have written the below code. I am using the component in a lightning app and using the preview for testing. Can you please let me know why the dropdown menu and buttons are not aligned properly.
Code
<aura:component >
<aura:attribute name="attr_selectTypeBoat" type='String[]' default='All Types'/>
<lightning:layout horizontalAlign="center">
<lightning:layoutItem flexibility="auto" padding="around-small" >
<lightning:select aura:id="selectTypeBoat" name="selectType" label='Please select'>
<aura:iteration items='{!v.attr_selectTypeBoat}' var='option'>
<option value='{!option}' text='{!option}' />
</aura:iteration>
</lightning:select>
</lightning:layoutItem>
<lightning:layoutItem flexibility="auto" padding="around-small" >
<lightning:button label="Search" variant="brand"/>
</lightning:layoutItem>
<lightning:layoutItem flexibility="auto" padding="around-small">
<lightning:button label="New" variant="neutral"/>
</lightning:layoutItem>
</lightning:layout>
</aura:component>
Output
Thanks
Vinny
Add extends keyword in the application:
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
Salesforce Freelance Consultant/Developer/Administrator
@For Salesforce Project Support: varaprasad4sfdc@gmail.com
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1
All Answers
Add extends keyword in the application:
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
Salesforce Freelance Consultant/Developer/Administrator
@For Salesforce Project Support: varaprasad4sfdc@gmail.com
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1
These are the two ways you can able to do it
1 . Extends your the Application with force.slds
2 . Use the Your component into the lightning experience page means include your component into the lightning experience ..