function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dai tran 6dai tran 6 

How can remove top border of pageBlock?

In visualforce page i using pageBlock and it display a top border is black:
User-added image
How can remove top border of  pageBlock?
or
How can change color of this top border?
 
Best Answer chosen by dai tran 6
Ajay K DubediAjay K Dubedi
Hi Dai,

Please use below CSS to remove the border or change the color of the border.

<style>

//To remove the border

.homeTab .bPageBlock {
    border: none;
}

//To change the color of the border

.homeTab .bPageBlock {
    border-top: 2px solid black !important;
}

</style>

Please select as best answer if it helps you.

Thank You,
Ajay Dubedi

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi,

Refer below links which has sample code for the same.

http://www.infallibletechie.com/2017/09/how-to-hide-lines-and-borders-in.html
 
https://developer.salesforce.com/forums/?id=906F00000009633IAA
 
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya
 
 
Ajay K DubediAjay K Dubedi
Hi Dai,

Please use below CSS to remove the border or change the color of the border.

<style>

//To remove the border

.homeTab .bPageBlock {
    border: none;
}

//To change the color of the border

.homeTab .bPageBlock {
    border-top: 2px solid black !important;
}

</style>

Please select as best answer if it helps you.

Thank You,
Ajay Dubedi
This was selected as the best answer
dai tran 6dai tran 6
To: Sandhya 
 <apex:pageBlock mode="maindetail"  > remove border ok
To: Ajay Dubedi
Must add class to pageBlock?
Current it not ok.
dai tran 6dai tran 6
Thank you , i remove homeTab , it is ok.
Ajay K DubediAjay K Dubedi
Hi Dai,

Try this one

<style>

//To remove the border

.bPageBlock {
    border: none;
}

//To change the color of border

.bPageBlock {
    border-top: 2px solid red !important;
}

</style>

Thank You,
Ajay Dubedi
Long Quan Pham 5Long Quan Pham 5
this works!