You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by hardik_982 <ha...@yahoo.com> on 2008/02/22 08:03:29 UTC
change in struts tabbedpanel style
can anybody say
how i can change in s:tabbedpanel tabs color of tab and style
thanks in advance
--
View this message in context: http://www.nabble.com/change-in-struts-tabbedpanel-style-tp15628786p15628786.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by hardik_982 <ha...@yahoo.com>.
Yes
you are right
i can do it after removing link of tabs.css from my jsp
thanks dude
--
View this message in context: http://www.nabble.com/change-in-struts-tabbedpanel-style-tp15628786p15650868.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
The specific problem is that your inline CSS occurs before your link to
tabs.css, so tabs.css overrides yours. Switch the order!
I don't think you should be importing tabs.css yourself - dojo will
import it for you (check in Firebug, it'll be listed twice if it's not
needed). I've never imported it myself.
hardik_982 wrote:
> <style type="text/CSS">
>
> .dojoTab div {...
> }
>
> </style>
> ...
> <link rel="stylesheet" type="text/css" href="<s:url
> value="/struts/tabs.css"/>">
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by hardik_982 <ha...@yahoo.com>.
I have use your logic like this
--------------------------------------------------------
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<s:head theme="ajax"/>
<style type="text/CSS">
.dojoTab {
position : relative;
float : left;
padding-left : 9px;
border-bottom : 1px solid #6290d2;
background :silver;
cursor: pointer;
white-space: nowrap;
z-index: 3;
}
.dojoTab div {
display : block;
padding : 4px 15px 4px 6px;
background :silver;
color : #333;
font-size : 90%;
}
</style>
<link rel="stylesheet" type="text/css" href="<s:url
value="/struts/tabs.css"/>">
</head>
<body>
<table >
<tr>
<td>
<s:tabbedPanel id="test2" theme="simple" cssStyle="width: 500px; height:
300px;" doLayout="true">
<s:div id="left" label="test1" theme="ajax" >
I'm a Tab!!!
</s:div>
<s:div id="middle" label="test2" theme="ajax" >
I'm the other Tab!!!
</s:div >
</s:tabbedPanel>
</td>
</tr>
</table>
</body>
</html>
-------------------------------------------------------
but it can not affect
whats resason
--
View this message in context: http://www.nabble.com/change-in-struts-tabbedpanel-style-tp15628786p15632486.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by hardik_982 <ha...@yahoo.com>.
great dude
i have installed firebug, its amazing!
thanks
--
View this message in context: http://www.nabble.com/change-in-struts-tabbedpanel-style-tp15628786p15632074.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Just override the css by creating your own CSS file and including it in
your page.
Take a look at the showcase:
http://www.planetstruts.org/struts2-showcase/ajax/tabbedpanel/example2.jsp
If you view the generated source using the Firefox plugin I mentioned
before you'll see this html:
<div style="width: 500px; height: 300px;" id="test2" class="dojoTabContainer dojoLayoutContainer">
<div style="left: 0px; top: 0px; bottom: auto; right: auto; width: 500px;" class="dojoTabLabels-top dojoAlignTop" role="wairole:tablist" wairole="tablist" dojoattachevent="onKey"><div dojoinsertionindex="0" class="dojoTab current" dojoattachevent="onClick"><div dojoattachpoint="innerDiv"><span style="-moz-user-select: none;" role="wairole:tab" dojoattachpoint="titleNode" tabindex="0" wairole="tab">test1</span><span dojoattachpoint="closeButtonNode" class="close closeImage" style="display: none;" dojoattachevent="onMouseOver:onCloseButtonMouseOver; onMouseOut:onCloseButtonMouseOut; onClick:onCloseButtonClick"></span></div></div><div dojoinsertionindex="1" class="dojoTab" dojoattachevent="onClick"><div dojoattachpoint="innerDiv"><span style="-moz-user-select: none;" role="wairole:tab" dojoattachpoint="titleNode" tabindex="-1" wairole="tab">test2</span><span dojoattachpoint="closeButtonNode" class="close closeImage" style="display: none;" dojoattachevent="onMouseOver:onCloseButtonMouseOver; onMouseOut:onCloseButtonMouseOut; onClick:onCloseButtonClick"></span></div></div></div>
<div style="left: 0px; top: 20px; bottom: auto; right: auto; width: 498px; height: 278px;" role="wairole:tabpanel" class="dojoTabPaneWrapper dojoAlignClient" dojoattachpoint="containerNode" dojoattachevent="onKey" wairole="tabpanel">
The class attributes are the parts of interest.
If you look at the embedded CSS you'll see these:
.dojoTab {
position : relative;
float : left;
padding-left : 9px;
border-bottom : 1px solid #6290d2;
background :
url(/struts2-showcase/struts/dojo/src/widget/templates/images/tab_left.gif)
no-repeat left top;
cursor: pointer;
white-space: nowrap;
z-index: 3;
}
.dojoTab div {
display : block;
padding : 4px 15px 4px 6px;
background :
url(/struts2-showcase/struts/dojo/src/widget/templates/images/tab_top_right.gif)
no-repeat right top;
color : #333;
font-size : 90%;
}
If you include those in your own CSS file you can override the style.
hardik_982 wrote:
> I USE STRUTS 2.0.11
> I want to say
> i am completely zero in dojo
> i could not understand docs of it can nt achieve to change tab style
>
> hey i find that there is complete source available of struts 2.0.11 in
> directory
> basically tabs.css contain in xwork.jar
> and it is built from
> \struts-2.0.11\src\core\src\main\resources folder
> can i remake jar after change in tabs.css
>
> pls guide me
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by hardik_982 <ha...@yahoo.com>.
I USE STRUTS 2.0.11
I want to say
i am completely zero in dojo
i could not understand docs of it can nt achieve to change tab style
hey i find that there is complete source available of struts 2.0.11 in
directory
basically tabs.css contain in xwork.jar
and it is built from
\struts-2.0.11\src\core\src\main\resources folder
can i remake jar after change in tabs.css
pls guide me
--
View this message in context: http://www.nabble.com/change-in-struts-tabbedpanel-style-tp15628786p15630121.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
hardik_982 wrote:
> -->PS. The styles may be documented somewhere at www.dojotoolkit.org for
> 0.4.0 but I don't recall ever seeing it.
>
> i think you tell about
> http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/themes-and-design/overriding-and-combining-themes
>
Yes, but that's for Dojo 0.9 which is a complete redesign from the
0.40/0.43 version's currently used by struts2.0/struts2.1.
The CSS may match though.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by hardik_982 <ha...@yahoo.com>.
-->PS. The styles may be documented somewhere at www.dojotoolkit.org for
0.4.0 but I don't recall ever seeing it.
i think you tell about
http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/themes-and-design/overriding-and-combining-themes
--
View this message in context: http://www.nabble.com/change-in-struts-tabbedpanel-style-tp15628786p15628959.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: change in struts tabbedpanel style
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
hardik_982 wrote:
> can anybody say
> how i can change in s:tabbedpanel tabs color of tab and style
> thanks in advance
>
Override the CSS.
In Firefox, install the Web Developer Toolbar and inspect the generated
source when you have tabs visible. You'll be able to see the styles on
the html tags and notice Dojo uses the "CSS sliding doors" approach for
rounded corners and gradients.
Use the Edit CSS feature to play with live CSS. Use FireBug to inspect
the elements if you like.
You should be able to find and understand the styles pretty quickly that
way.
PS. The styles may be documented somewhere at www.dojotoolkit.org for
0.4.0 but I don't recall ever seeing it.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org