Document library web part style issue

Tom Troughton asked on June 29, 2015 10:17

I'm using a document library web part on a page. It is appearing like this:

Image Text

Notice how the files table is pushed to the right? This is because the DIV which contains the New document button (with CSS class direct-file-uploader) is getting a width (128px) and height (35px) added to its style attribute. These styles are not present in the HTML source so it must be a Javascript thing. If I remove these width and height styles the web part displays correctly.

I've hunted through the scripts on the page and can't find anything that would obviously add these attributes. But if I look at example document libraries on the Kentico Corporate Site example they are not present.

This is definitely not being caused by my own scripts. Any idea how to prevent this?

Recent Answers

Debashis Raybiztech answered on July 13, 2015 11:55 (last edited on July 24, 2015 10:52)

You Can write jquery to prevent file types. Like


var allowedTypes = ["jpg", "jpeg", "gif", "png"];

var path = $imagefile.val(); var ext = path.substring(path.lastIndexOf('.') + 1).toLowerCase();

if ($.inArray(ext, allowedTypes) < 0) { alertValidation += '\n\u2022 Unsupported file type'; }

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on July 13, 2015 12:25

Thanks for replying but this doesn't have anything to do with my question. My question is about CSS styling on the document library web part.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.