I started with a blank ASPX page and added two list views to it. I am using CSS to modify some of the styles on the page, and I have been relatively successful; however, I am now trying to change the "ms-vb2 ms-vb-lastCell" class for only the first listview. So naturally I was trying to do

#id .ms-vb2 ms-vb-lastCell

However the ID of the listview table is: "{39F86178-3D5B-4272-B9AD-472E456467D3}-{G_326F2ECF_0DEB_4582_8F94_3BBEEE0327E1}" and it doesn't look like I am able to use that as a valid ID selector.


#{39F86178-3D5B-4272-B9AD-472E456467D3}-{G_326F2ECF_0DEB_4582_8F94_3BBEEE0327E1} .ms-vb2 ms-vb-lastCell {

Does not work. What should I do to modify the .ms-vb2 ms-vb-lastCell class on only the first listview?

  • Could you use something like :first-child or :first-of-type to target the first list view? Feb 11, 2016 at 17:28

1 Answer 1


First, unless that's a typo, it looks like you are missing a period between your class selectors, so it should be:

#id .ms-vb2.ms-vb-lastCell

But if the ID still isn't working, taking a quick look at a list view web part (in SP 2013, might be different in 2010, not sure what you are working in), it looks like the table has an attribute summary whose value is the list name.

So you could do something like

table[summary='My List Name'] .ms-vb2.ms-vb-lastCell
  • yep summary was available as an attribute in the tag which seems to be better, and you are right, I was missing the extra period as well.
    – Sean W.
    Feb 11, 2016 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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