Daniel
Daniel

Reputation: 854

Aligning PrimeFaces' "p:tabView" to the right

Is there a way to align the tabs to the right?

I tried to play with style="text-align:right;", as they do in yui - but it doesn't seem to work.

Upvotes: 1

Views: 5246

Answers (2)

Andrzej Marciniak
Andrzej Marciniak

Reputation: 249

I know that it was an old post but I found new solution:

<p:tab titleStyle="float:right".../>

Upvotes: 0

Daniel
Daniel

Reputation: 854

In order to solve this problem we need to override Primefaces' jquery-ui.css property.

1.Create a new css containing:

.ui-tabs .ui-tabs-nav li{float:right!important;}

(name it tab_view_align_right.css, and put it under web/resources/css).

2.Add

<h:head>
    <h:outputStylesheet name="css/tab_view_align_right.css"/>
</h:head>

to the JSF file.

Upvotes: 1

Related Questions