How do i add style sheet for standard detail layout of a custom object.

I have a custom object list view displayed and when user clicks on any particular record it displayed the detail page for that record..On that detail page displayed, I would like to add style sheet..How do i do that?

1 Answer 1


You can override a View with a Visualforce page and add style sheet on this page.

here is the sample code of visualforce page with CSS

<apex:page standardController="Customobject__c">
<style type="text/css">
<!-- custom Stylesheet -->

 <apex:detail/> <!-- this tag will display standard detail pages as defined by the associated page layout for the object in Setup -->


Here are the steps to link above create page with custom object view link.

  1. For custom objects, from Setup, click Create | Objects, and select custom objects in the list.
  2. Click Edit next to the View button.
  3. Pick the type of override you want associated with the action.
  4. Select the Visualforce page you want to run when users click the view button.
  5. Click Save.

You must log in to answer this question.

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