Вопрос

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.

I.E.

#{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?

Это было полезно?

Решение

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
Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top