0

So I made a custom People Search that displays user's information in a table view. Now I need to be able to customize the font of all that user information so that it can be printed and read easily.

I identified the correct class id and put together a css file that i know is working (tested it by hiding the web part with @media Print), but the font never changes from the default....

How can I change it?

The css file is being called from a Content Editor web part on the page btw.

  • Which version of SharePoint are you referencing? – Matthew McDermott Oct 5 '13 at 10:53
1

I was only referencing the ID of the web part itself, when what I needed to do was reference both the web part ID and the child elements of that web part ID that i wanted to change.

So when I was doing this:

@media Print
{
 #MSOZoneCell_WebPartWPQ8
 {
  color:black !important;
  font-size:12pt;
  font-weight:bold
 }
}

I actually needed to be doing this:

@media Print
{
 #MSOZoneCell_WebPartWPQ8 .ms-vb2, 
 #MSOZoneCell_WebPartWPQ8 .ms-vb-user a, 
 #MSOZoneCell_WebPartWPQ8 .ms-vb-title a
 {
 color:black !important;
 font-size:12pt;
 font-weight:bold
 }
}
0

If you are trying to change a SharePoint class like ms-whatever add at the en of the definition of that class !important. For example:

.ms-whatever{color: #FF0000 !important}

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.