+ Start a Discussion
Mohd AshharMohd Ashhar 

Lightning:FileCard Decrease the card size

Can anyone explain what the body attribute is used for.... I want to decrease the size of the FileCard , it is now 20rem and I am not able to change it to 10rem;
Raj VakatiRaj Vakati
You can try as below 
 
<aura:component>
    <div>
        <lightning:layout>
            <lightning:layoutItem padding="around-small" class="demo">
                <div>    <lightning:fileCard fileId="0696A0000027gJh"/></div>
            </lightning:layoutItem>
            
        </lightning:layout>
    </div>
</aura:component>
 
.THIS demo {
    height:10px !important; 
    width:10px !important;
    background:#000000 !important;
    width: 150px;
    border: 1px solid black; 
    max-width: 100% !important;
    position: absolute  !important; 
    top: 0%  !important; ;
    left: 0%  !important; 
    -webkit-transform: translate3d(-50%, -50%, 0)  !important; 
    -ms-transform: translate3d(-50%, -50%, 0)  !important; 
    transform: translate3d(-50%, -50%, 0)  !important; 
    max-width: 100%  !important; 
    
    
}

 
Tim May 12Tim May 12
None of the above worked really. I had to hard-code the width to be a specific size.
 
.THIS div.slds-file--card {
    width: 800px;
}