I am using XSL Stylesheet for styling a list view web part. In the webpart properties I can set the height as fixed or not. I want to be able to set a fixed height of maximum limit eg. 200px. What I mean is if the height of the webpart is below 200px it will shrink and extend as it does in the case when no fixed height is given. But as soon as height exceeds 200px a scroll bar appears i.e the webpart can shrink to any limit but cannot grow beyond 200px. How can I do this? Currently I have set a fixed height and when the height is below 200px a lot of empty space can be seen which doesn't look good.

Can someone pls help out?

  • Are you looking for SharePoint App? I mean you you are trying to set Client Web Part (App Part) height? – Pradip R. Mar 12 '15 at 12:50
  • yes i am using an out of the box list view web part – Aparna Sarkar Apr 3 '15 at 9:19

Using web part properties you can only provide a fixed height.

A solution to your problem is to wrap your web part using a div tag and setting style min-height. This will provide a minimum height and auto expand based on the content height.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.