1

How can I increase the width of a column in SharePoint 2013 list, without increasing the entire width of the page.

Such that the if Column 4 width is increased it squeezes the other column to allocate space, but not increase the entire webpage width.

Yes it can be done with CSS and I have tried increasing the value of the column.

CSS Code:

.ms-listviewtable tr:first-child td +td+td+td
{

width:600px;

}

But on screen it doesn't increase the width of column 4, but of any other column and it is confusing.

Any suggestions.

  • Can this be done without code? Using the editing tools within SharePoint? I do not have the tools or knowledge to use any code? – DavidnATL May 29 at 13:43
3

You can set the webpart to a static width and then set the width of any column that you like with a script editor webpart.

<style type='text/css'>
.ms-vh-div[DisplayName='<ColumnName>']
{
  width:250px;
}
</style>

Just insert the display name of the column instead of <ColumnName>.

0

Please try below css:

.ms-listviewtable td:nth-child(4) {
    width:600px;
}

Here, in nth-child() you have to pass number of column. Here it's for 4th column.

And if its width cannot be overridden then use width:600px !important; in upper code.

Hope this will help you.

0

Use this javascript:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("TH.ms-vh2:contains('Column Name')").css("width", "300px"); //You can change the Column Name to be the column you want to change the width, Title in the code for example.
});
</script>
0

Solution for me was very simply. As soon as multiple [Space]s are not working because are shortened by design, I extended the name of column in setting by using char from ASCII like that: [ALT]+255. It is an invisible char. You can write as many chars as you wish in the tittle of the column and it will make it wider without shortening.

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.