Sunday, September 26, 2010

Removing the border from header layout unit

As you have seen the layout contains layout units. You can put any element inside a layout unit. Now there is a border for each layout unit. For our online store, I do not want the border and the header title. In order to remove the border, you will need to override the CSS style and to remove the header just remove the header attribute (header="TOP") from the layout unit tag. This is shown in listing below
<html xmlns=""

<f:view contentType="text/html">

<title>Simple Store - Home</title>

<link type="text/css" rel="stylesheet"
href="#{request.contextPath}/themes/cupertino/skin.css" />


.ui-layout-unit-top .ui-layout-bd {
border: 0;




<p:layout fullPage="true">
<p:layoutUnit position="top" height="80">
<h:outputText value="Top content." />
<p:layoutUnit position="bottom" header="BOTTOM" height="100">
<h:outputText value="Bottom content." />
<p:layoutUnit position="left" header="LEFT" width="300">
<h:outputText value="Left content" />
<p:layoutUnit position="right" header="RIGHT" width="200">
<h:outputText value="Right Content" />
<p:layoutUnit position="center" header="CENTER">
<h:outputText value="Center Content" />



The result is shown in figure below

1 comment: