You need to sign in to do that
Don't have an account?
How to increase Lightning Component height?
Hello
I have a Custom Button that triggers displaying of a Lightning Component.
In the Custom Button, I can specify height but not width of the component.

Currently, the width of the Lightning Component takes 50% of the screen but I want 90%.
How can I achieve that?
I have a Custom Button that triggers displaying of a Lightning Component.
In the Custom Button, I can specify height but not width of the component.
Currently, the width of the Lightning Component takes 50% of the screen but I want 90%.
How can I achieve that?
1- You can use main <div> body of hole page </div>
<aura:component>
<div class="slds-m-around_large">body</div>//"slds-m-around_small","slds-m-around_x-small" you can also use this.
or
<div style="width:90%;"> body</div>
</aura:component>
2- If you used a lightning tag. You can define this.
<lightning:layout class= "widthclass"> body </lightning:layout>
The first one is to edit the component's style sheet
.THIS .widthclass{
width: 90%;
}
3- You can also check below URL.
http://www.lightningdesignsystem.com/utilities/sizing/
http://www.infallibletechie.com/2016/07/how-to-set-properties-in-custom.html
Please mark it as best Answer if you find it helpful.
Thank You
Ajay Dubedi
i tried your solution #1 but it does not work.
The Component width is still not even 50% of the page.
This is the code I have put :
This is how the component displays, you see width is very small :
<aura:html tag="style">
.slds-modal__container{
width: 80% !important;
max-width: 80% !important;
}
.slds-modal__header h2{
font-weight: 500 !important;
font-size: 1.7rem;
}
</aura:html>
to increase the modal size
Hope it helps!