How to Change the Background Color of WebPart Title

Hey Guys,
I got a requirement from the business to change the Background color of the webpart title for Out of Box webparts. Then i started looking on CSS I found the following CSS class which overrides the style of WebPart Title.

.ms-WPHeader TD
border-bottom:0px solid #4e7cb7;

Change this class as per your requirement then you are done….

.ms-WPHeader TD{
background-color: #0174DF;
font-size: larger;
font-weight: bold;
border-bottom:0px solid #4e7cb7;

1 comment to How to Change the Background Color of WebPart Title

  • (Saurabh)

    Hi Uday…..

    I am adding webparts on my Page Programatically……so
    System.Web.UI.WebControls.WebParts.WebPart HelloWP = new Hello.HelloWebpart;
    HelloWP.Title = “My Webpart”;

    mgr.AddWebPart(HelloWP, “Left”, 0);
    (mgr is my WebpartManager)

    now how can i set the CSS to my webpart….???

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>