Richard Nichols
unread,Feb 9, 2011, 12:31:22 AM2/9/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to visural...@googlegroups.com
Hi Lee,
You can override the CSS file that is included by the tabs component by overriding the following method in your Tabs() declaration
protected ResourceReference getCSS() {
return new TabsCSS();
}
E.g.
add(new Tabs("mytabs") {
protected
ResourceReference getCSS() {
return new ResourceReference(MyPage.class, "mycss.css");
}
});
The css file included by default is as follows -
.tabs {
display: block;
margin: 0px 0px 15px 0px;
}
a.tab {
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border: 1px dashed #aaaaaa;
border-bottom: 0px;
background-color: #ffffff;
color: #6a6a6a;
font-weight: bold;
margin-right: 10px;
padding: 2px 5px;
display: inline-block;
text-decoration: none;
}
a.tab_selected, a.tab:hover {
background-image: -moz-linear-gradient(top, #cccccc, #eeeeee);
background-image: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#eeeeee));
-webkit-box-shadow: 0px 1px 2px #000000;
-moz-box-shadow: 0px 1px 2px #000000;
box-shadow: 0px 1px 2px #000000;
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
background-color: #eeeeee;
border: 1px solid #666666;
color: #303030;
font-weight: bold;
margin-right: 10px;
padding: 2px 5px;
text-shadow: 0 1px 1px #ffffff;
display: inline-block;
text-decoration: none;
}
.tabpage_selected {
border: 1px solid #666666;
padding: 5px;
-webkit-box-shadow: 0 2px 5px #000000;
-moz-box-shadow: 0 2px 5px #000000;
box-shadow: 0 2px 5px #000000;
}
.tabpage {
display: none;
}
You can customise the above CSS as you see fit to change the styling of the tabs to suit your application.