say I have the following.

<apex:tabPanel  selectedTab="Tab 1"  >
            <apex:tab label="Tab1" name="Tab1" id="tabOne" />
            <apex:tab label="Tab2" name="Tab2" id="tabOne" />
            <apex:tab label="Tab3" name="Tab3" id="tabOne" />

How do I center the tabs themselves? It seems to align left, and setting a style class for the tab panel doesn't seem to do anything.

How do I center it like this?


Hi Use headerAlignment attribute.

<apex:tabPanel headerAlignment="center">

use header alignment

<apex:page >

  <apex:tabPanel headerAlignment="center" selectedTab="Tab 1"  >
            <apex:tab label="Tab1" name="Tab1"  />
            <apex:tab label="Tab2" name="Tab2"  />
            <apex:tab label="Tab3" name="Tab3" /> </apex:tabPanel>


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy