2

I want to change some style attributes of pageblock header, like padding-bottom or hight.

enter image description here

0

3 Answers 3

2

You can apply CSS to Pageblock header like following:

.pbHeader {

   //put your custom css here

}

2

I would use an outputPanel with assigned style class as a wrapper for the pageBlock, because we can not assign any style classes directly to thr page block. The access a header. The header has a class mainTitle or you can just access H2 tag directly. Don't forget to use !important notification:

<style>
.panelWrapper .mainTitle {
    background-color: green !important;
    color:white !important;
    padding: 30px 0 20px 40px !important;
}
</style>

<apex:outputPanel styleClass="panelWrapper" layout="block">
    <apex:pageBlock title="Hello">
    </apex:pageBlock>
</apex:outputPanel>

Looks like this then:

enter image description here

1
  • I used this way but the only applied style is color, but the padding didn't change. maybe because I have custom style for panelWrapper. Thank you Commented Jan 22, 2014 at 10:45
-1

Neither of the above solutions worked for me. But this did.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .