Upload size (Height) fill

1 Answer 108 Views
Upload
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 20 Oct 2022, 03:03 PM

Hello,

how to use CSS to set the height of the Upload to fill the parent (see picture)

Robert

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 25 Oct 2022, 12:18 PM

Hello Robert,

The Upload component consists of a "k-dropzone" element and a "k-upload-files" container that holds the selected files, so you could set the height of the overall Upload container to 100% to match its parent element height:

<style>
.k-upload {
    height: 100%;
}
</style>

Also, you can apply the CSS style below if the selected files container's height ("k-upload-files") should match the parent element height:

<style>
.k-upload .k-upload-files {
    max-height: calc(100% - 46px); /* subtract the height of the dropzone container*/
    height: 100%;
}
</style>

REPL example: https://netcorerepl.telerik.com/QcFYmfbQ17nEBS7s07

I hope that helps.

 

Regards, Mihaela Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Robert Madrian
Top achievements
Rank 1
Veteran
Iron
commented on 25 Oct 2022, 01:57 PM

Thank you
Tags
Upload
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Mihaela
Telerik team
Share this question
or