I want to change some style attributes of pageblock header, like padding-bottom or hight.
3 Answers
You can apply CSS to Pageblock header like following:
.pbHeader {
//put your custom css here
}
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:
-
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