Tabbox – Accordion Mold

The style of accordion tabbox include 3 parts, style of panel, selected tab and non-selected tab.

Style of Panel

CSS Definition

Description

Default Values

. tabpanels_sclass tabpanel_accrodion

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 Selected Tab

CSS Definition

Description

Default Values

.tabaccd-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;

.tabaccd-3d-tm-sel

Top-middle line of a selected tab

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

height:5px;

.tabaccd-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;

.tabaccd-3d-ml-sel

Middle-left of a selected tab

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

width:5px;

.tabaccd-3d-mm-sel

Middle-middle of a selected tab

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

.tabaccd-3d- mr-sel

Middle-right of a selected tab

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

width:5px;

.tabaccd-3d-b

bottom of a selected tab

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

height:1px;

Style of Non-Selected Tab

CSS Definition

Description

Default Values

.tabaccd-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;

.tabaccd-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;

.tabaccd-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;

. tabaccd-3d-ml-uns

Middle-left of a non-selected tab

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

width:5px;

.tabaccd-3d-mm-uns

Middle-middle of a non-selected tab

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

.tabaccd-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;

.tabaccd-3d-b

bottom of a non-selected tab

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

height:1px;

Customize the panel style

The way to customize the background and border of a accordion tabbox is declaring the style as following.

1.include style and assign sclass of tabpanels

<style src="~./mytab.css.dsp"/>
<tabbox width="400px" orient="vertical">
<tabbox width="400px" mold="accordion">
<tabs>
<tab label="Tab 1" />
<tab label="Tab 2" />
</tabs>
<tabpanels sclass="mytp" >
<tabpanel height="200px">This is panel 1</tabpanel>
<tabpanel height="200px">This is panel 2 The second panel</tabpanel>
</tabpanels>
</tabbox>
</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-accordion{
background-color:#FFEEB6;
border-top:1px solid #FFBB47;
border-bottom:1px solid #FFBB47;
border-right:3px solid #FFBB47;
    }    

Customize the selected tab style

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

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

. mytp .tabaccd-3d-tl-sel{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-tl-sel.gif')});

height:5px;

width:5px;

}

. mytp .tabaccd-3d-tm-sel{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-tm-sel.gif')});

height:5px;

}

. mytp .tabaccd-3d-tr-sel{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-tr-sel.gif')});

height:5px;

width:5px;

}

. mytp .tabaccd-3d-ml-sel{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-ml-sel.gif')});

width:5px;

}

. mytp .tabaccd-3d-mm-sel{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-mm-sel.gif')});

}

. mytp .tabaccd-3d-mr-sel{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-mr-sel.gif')});

width:5px;

}

. mytp .tabaccd-3d-b{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-b.gif')});

}

2.Design the image files of above style. And put these files in the application folder(ex, /tabbox-acc. 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/

. mytp .tabaccd-3d-tl-uns{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-tl-uns.gif')});

height:5px;

width:5px;

}

. mytp .tabaccd-3d-tm-uns{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-tm-uns.gif')});

width:5px;

}

. mytp .tabaccd-3d-tr-uns{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-tr-uns.gif')});

height:5px;

width:5px;

}

. mytp .tabaccd-3d-ml-uns{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-ml-uns.gif')});

width:5px;

}

. mytp .tabaccd-3d-mm-uns{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-mm-uns.gif')});

}

. mytp .tabaccd-3d-mr-uns{

background-image : url(${c:encodeURL('/tabbox-acc/mytab-mr-uns.gif')});

width:5px;

}

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