I have a problem with the height of th rows in a table. The table is created by a webpart (a view of a wiki pages library). I found the row height depending on the following class(es):

.ms-listviewtable (also .ms-itmhover and .ms-itmhoverEnabled)

Using Chrome dev tools I can change successfully the table rows height changing the .ms-listviewtable .ms-itmhover height (until rows shrink eachother), but if I set the same value in the script of my page, it does not work at all.

what happens in chrome dev...

here the page edited Does anybody have some idea about what to do? I already checked all possible classes, but the row height seems to be frozen.


I have found the class to manipulate. It is the .ms-rtestate-read. So if I just give .ms-rtestate-read:line-height:70% I get what I need.


The .ms-listviewtable .ms-itmhover is more specific than just .ms-itmhover or .ms-listviewtable using in your second picture.

So the browser uses the.ms-listviewtable .ms-itmhover style.

  • But the ".ms-listviewtable .ms-itmhover" is not a style, it is just a serie os classes.... however I cannot use such a definition in a script, but just a class at once. By the way in the page code I found something strange: '<tr class=" ms-itmHoverEnabled ms-itmhover" ...' with an empty space before the class name. Can it cause the problem? I have already used this kinf od script to shrink the tables, but here it diesn't work
    – Marpio
    Oct 17 '14 at 12:19
  • I don't think that space can cause any problem. Why can't you use multiple class in your script? Oct 17 '14 at 12:41
  • I can use them, but comma separated. Anyway also giving to the script ".ms-listviewtable, .ms-itmhover, .ms-itmhoverEnabled {height:15px; background-color:yellow;}" I have no result... apart the yellow background I put just to check. So it seems that all controls work, but the height or line-height controls... "
    – Marpio
    Oct 17 '14 at 12:47
  • "Comma separated" means that you apply the style to each single class. But the combination of class just more specifics then each single class definition. If you are using jQuery then you can use ".ms-listviewtable.ms-itmhover" for multiclass selection. Oct 17 '14 at 12:52
  • Unfortunately I can only use CSS scripts :(
    – Marpio
    Oct 17 '14 at 12:59

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.