Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to create custom sidebar in visual force page? I want to have a sidebar similar to the one we see in Setup page.


Like this!. Is there a way to do this?

share|improve this question
up vote 4 down vote accepted

There is no standard Visualforce component for a sidebar or such a layout design. But Visualforce is fully compatible with your own HTML and CSS, so you can build this the way you'd do normally.

     /* inline css stuff you'd need to align the divs*/
  <!-- refering to a stylesheet file is prefered ofc, as that can be cached. -->
  <apex:stylesheet value="/resources/htdocs/css/basic.css"/>

  <div id="this is my sidebar">
     <!-- you can use visualforce components inhere-->
  <div  id="this is my main content div">
       <!-- you can use visualforce components inhere-->

How to specifically do this with HTML and CSS is not salesforce specific and better asked at stackoverflow.

share|improve this answer
Oh ok, so can i use apex tags inside those div, like <apex:pageblock> <apex:pageblocktable> ? – Akash Nidhi P S Apr 18 '14 at 13:58
yes, that's how it works. – Samuel De Rycke Apr 18 '14 at 14:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.