+ Start a Discussion
Nithesh NNithesh N 

Lightning Component Size

I created an lightning component that displays the Number and a footer text. But when i added it to the account page through lightning app builder, The surrounding margin size of the component is too big. Is there any way i can control the sizing of the component? 

P.S. I tried creating a css class with height and width properties. and added it to outer div. But it didnt work. 
User-added image
Best Answer chosen by Nithesh N
Sandeep WaliaSandeep Walia
Hi Nitesh,

It would have helped if you would have attached the screenshot of the whole page(as I am guessing that you your account page would have other components).
To solve your problem you would have to inspect the lightning component and take out it's id or class name and define the desired style in your custom component itself in the <style> tags. Please make sure that you define the style in the component and not in the CSS part of the component.

I have faced a similar problem while creating custom lightning global actions and this solution works fine for me.
Do reply in case you face any difficulty.

Hope this helps,