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?


1 Answer 1


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.

  • Oh ok, so can i use apex tags inside those div, like <apex:pageblock> <apex:pageblocktable> ? Apr 18, 2014 at 13:58
  • yes, that's how it works. Apr 18, 2014 at 14:12

You must log in to answer this question.

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