Tabbox – Horizontal

The style of horizontal tabbox include 4 parts, style of panel, tabs corner, selected tab and non-selected tab.

Style of Panel

CSS Definition

Description

Default Values

. tabpanels_scalss

.tabpanel

.tababpanel-hr

the style of a tab panel

border-bottom:1px solid #5C6C7C;

border-left:1px solid #5C6C7C;

border-right:1px solid #5C6C7C;

padding:5px;

Style of Tabs Corner

CSS Definition

Description

Default Values

. tabs_sclass

.tab-3d-first1

The left corner

background-image:url(/zkdemo/zkau/web/zul/i mg/tab/3d-first1.gif);

height:3px;

width:1px;

. tabs_class

.tab-3d-first2

The line of left corner

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-first2.gif);

height:3px;

width:3px;

. tabs_class

.tab-3d-last1

The line of right corner

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-last1.gif);

height:3px;

width:3px;

. tabs_class

.tab-3d-last2

The right corner

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-last2.gif);

height:3px;

width:1px;

Style of Selected Tab

CSS Definition

Description

Default Values

. tab-3d-tl-sel

Top-left corner of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-tl-sel.gif);

height:5px;

width:5px;

.tab-3d-tm-sel

Top-middle line of a selected tab

background-image:url(/zkdemo/zkau/web/zul/i mg/tab/3d-tm-sel.gif);

height:5px;

.tab-3d-tr-sel

Top-right corner of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-tr-sel.gif);

height:5px;

width:5px;

. tab-3d-ml-sel

Middle-left of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-ml-sel.gif);

width:5px;

.tab-3d-mm-sel

Middle-middle of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-mm-sel.gif);

.tab-3d-mr-sel

Middle-right of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-mr-sel.gif);

width:5px;

.tab-3d-bl-sel

bottom-left of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-bl-sel.gif);

height:3px;

width:5px;

.tab-3d-bm-sel

bottom-middle of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-bm-sel.gif);

height:3px;

.tab-3d-br-sel

bottom-right of a selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-br-sel.gif);

height:3px;

width:5px;

Style of Non-Selected Tab

CSS Definition

Description

Default Values

. tab-3d-tl-uns

Top-left corner of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-tl-uns.gif);

height:5px;

width:5px;

.tab-3d-tm-uns

Top-middle line of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-tm-uns.gif);

height:5px;

.tab-3d-tr-uns

Top-right corner of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-tr-uns.gif);

height:5px;

width:5px;

. tab-3d-ml-uns

Middle-left of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-ml-uns.gif);

width:5px;

.tab-3d-mm-uns

Middle-middle of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-mm-uns.gif);

.tab-3d-mr-uns

Middle-right of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-mr-uns.gif);

width:5px;

.tab-3d-bl-uns

bottom-left of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/i mg/tab/3d-bl-uns.gif);

height:3px;

width:5px;

.tab-3d-bm-uns

bottom-middle of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-bm-uns.gif);

height:3px;

.tab-3d-br-uns

bottom-right of a non-selected tab

background-image:url(/zkdemo/zkau/web/zul/img/tab/3d-br-uns.gif);

height:3px;

width:5px;

Customize the panel style

The way to customize the background and border of Tabbox is declaring the style as following.

1.include style and assign sclass of tabpanels

<style src="~./mytab.css.dsp"/>
<tabbox width="400px">
<tabs>
<tab label="Tab 1" />
<tab label="Tab 2" />
</tabs>
<tabpanels sclass="mytp" height="300px">
<tabpanel >This is panel 1</tabpanel>
<tabpanel >This is panel 2 The second panel</tabpanel>
</tabpanels>
</tabbox>

2.Add mytab.css.dsp in class path/web/

<%@ page contentType="text/css;charset=UTF-8" %>
<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
.mytp .tabpanel .tabpanel-hr{
background-color:#EBEBFF;
border-bottom:3px solid #FFBB47;
border-right:1px solid #FFBB47;
border-left:1px solid #FFBB47;
}

Customize the corner style

The way to customize the tabs corner of Tabbox is declaring the style as following.

1.assign sclass of tabs

<style src="~./mytab.css.dsp"/>
<tabbox width="400px" >
<tabs sclass="mytabs">
<tab label="Tab 1" />
<tab label="Tab 2" />
</tabs>
<tabpanels sclass="mytp" height="300px">
<tabpanel >This is panel 1</tabpanel>
<tabpanel >This is panel 2 The second panel</tabpanel>
</tabpanels>
</tabbox>

2.append customized css into mytab.css.dsp in class path/web/

.mytabs .tab-3d-first1{
background-image:url(${c:encodeURL('/tabbox/mytab-first1.gif')});
height:6px;
width:2px;
}
.mytabs .tab-3d-first2{
background-image:url(${c:encodeURL('/tabbox/mytab-first2.gif')});
height:6px;
width:1px;
}
.mytabs .tab-3d-last1{
background-image:url(${c:encodeURL('/tabbox/mytab-last1.gif')});
height:6px;
width:1px;
}
.mytabs .tab-3d-last2{
background-image:url(${c:encodeURL('/tabbox/mytab-last2.gif')});
height:6px;
width:2px;
}

3.Design the image files of above style (mytab-first1.gif, mytab-first2.gif, mytab-last1.gif, mytab-last2.gif). And put these files in the application folder(ex, /tabbox. It depends on you design)

Customize the selected tab style

The way to customize the selected of Tabbox is declaring the style as following.

1.append customized css into mytab.css.dsp in class path/web/

.mytabs .tab-3d-m{
height:22px;
} 
.mytabs .tab-3d-tl-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-tl-sel.gif')});
height:5px;
width:5px;
} 
.mytabs .tab-3d-tm-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-tm-sel.gif')});
height:5px;
} 
.mytabs .tab-3d-tr-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-tr-sel.gif')});
height:5px;
width:5px;
} 
.mytabs .tab-3d-ml-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-ml-sel.gif')});
width:5px;
} 
.mytabs .tab-3d-mm-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-mm-sel.gif')});
} 
.mytabs .tab-3d-mr-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-mr-sel.gif')});
width:5px;
} 
.mytabs .tab-3d-bl-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-bl-sel.gif')});
height:6px;
width:5px;
} 
.mytabs .tab-3d-bm-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-bm-sel.gif')});
height:6px;
} 
.mytabs .tab-3d-br-sel{
background-image : url(${c:encodeURL('/tabbox/mytab-br-sel.gif')});
height:6px;
width:5px;

}

2.Design the image files of above style. And put these files in the application folder(ex, /tabbox. It depends on you design)

Customize the non-selected tab style

The way to customize the non-selected of Tabbox is declaring the style as following.

1.append customized css into mytab.css.dsp in class path/web/

.mytabs .tab-3d-tl-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-tl-uns.gif')});
height:5px;
width:5px;
} 
.mytabs .tab-3d-tm-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-tm-uns.gif')});
width:5px;
} 
.mytabs .tab-3d-tr-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-tr-uns.gif')});
height:5px;
width:5px;
} 
.mytabs .tab-3d-ml-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-ml-uns.gif')});
width:5px;
} 
.mytabs .tab-3d-mm-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-mm-uns.gif')});
} 
.mytabs .tab-3d-mr-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-mr-uns.gif')});
width:5px;
} 
.mytabs .tab-3d-bl-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-bl-uns.gif')});
height:6px;
width:5px;
} 
.mytabs .tab-3d-bm-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-bm-uns.gif')});
height:6px;
} 
.mytabs .tab-3d-br-uns{
background-image : url(${c:encodeURL('/tabbox/mytab-br-uns.gif')});
height:6px;
width:5px;

}

3.Design the image files of above style. And put these files in the application folder(ex, /tabbox. It depends on you design)