4

I have three webparts and each of these have titles.
I want to change the background of a single title.

I have the following webparts: enter image description here

I want to change title background for only this Title called Aplikacionet but I do not want to style other webpart titles like CleverTools or Internal Links.

The webpart title I would like, is this:

enter image description here

  • Find the id by inspecting element from browser and then apply some CSS – Atish Dipongkor - MVP Jan 12 '16 at 12:35
  • Thanks @AtishDipongkor for your suggestion, but when I modify the the background with my webpart id the background is too large i want it to be smaller but i cant do it with CSS i dont know how! – Nderon Hyseni Jan 12 '16 at 12:40
  • Can you show your code? I mean update the question – Atish Dipongkor - MVP Jan 12 '16 at 12:42
4

Find id of that WP. Something like WebPartTitleWPQ4. Edit that page and insert script editor WP and add <style>

<style>
#WebPartTitleWPQ4 h2 {
    background-color: #000; 
    color: #fff;
}
</style>

EDIT Find where is title. For ex.

<style>
#WebPartTitleWPQ4 h2 {
    background-color: #000; 
    }
#WebPartTitleWPQ4 h2 span {
    color: #fff;
}
</style>
  • but the color: #fff won`t work for me! why? – Nderon Hyseni Jan 12 '16 at 12:50
  • Try with color: #fff !important – Marko Tica Jan 12 '16 at 12:53
  • nope it won`t work – Nderon Hyseni Jan 12 '16 at 12:57
  • 1
    now it is working thank you so much u r a live saver – Nderon Hyseni Jan 12 '16 at 14:04

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.