0

I have a web part on a SharePoint 2013 webpart page that I would like to modify and instead of having a colored title bar with text I would like to replace it with an image. Is this possible? I would appreciate any help. I have already tried the following code but it doesn't show the image

`

WebPartTitleWPQ6 h2 {

background-image: "https://vaww.visn10.portal.va.gov/sites/1VERC/travel/SiteAssets/Step1.png"; 
color: #fff;

} `

1

Please try this one

 #MSOZoneCell_WebPartWPQ2 h2{
    background-image: url(http://i.stack.imgur.com/jGlzr.png) !important;
    background-color: #cccccc !important;
}

MSOZoneCell_WebPartWPQ2 -> This is the Id of the Webpart div.

Title has background instead of color

0

Personally I would just hide the default webpart title and add a script editor with some custom html/css/js. This gives you more control and doesn't require you to target webpart IDs with css selectors that change when new webparts are added or things get moved around.

If you're doing this from a central place and changing "all" webpart titles then I understand adding something more general to the masterpage or whatever. For one-off's though, script editor is your bestest friend.

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.