-
1. Re: Extend richfacees rf-tab-cnt css class?
ibstmt Jul 26, 2012 8:42 AM (in response to s.santilli)I think you want to use the "styleClass" attribute on the tab, not "id":
<rich:tab styleClass="my-style">
.my-style
{
padding: 0px;
}
Also, in my experience, if I need to have a custom version of a RF style, I create my own version of it, with the same name, in my .css file. I don't need to refer to the name, because Richfaces is already going to look for it by default.
.rf-tab-cnt {
padding: 0px;
}
-
2. Re: Extend richfacees rf-tab-cnt css class?
s.santilli Jul 26, 2012 12:12 PM (in response to ibstmt)Hi ibstmt,
I wanted to thank-you for your attempt, however I also wanted to clarify
that your post is not correct in the event someone stumbles upon
it, wanting to try it to no avail.
Also, in my experience, if I need to have a custom version of a RF style, I create my own version of it, with the same
name, in my .css file. I don't need to refer to the name, because Richfaces is already going to look for it by default.
My goal is to have only the one tab effected by my desired padding change. Your suggestion
(I'm sure most think of) would effect more than the one tab, in fact overwriting the rf-tab-cnt
would effect the rich faces implemented css class, throughout the entire project ... again
not my goal as stated.
I think you want to use the "styleClass" attribute on the tab, not "id":
Using the styleClass, effect those elements that inherit the class styleClass="myStyle"
however, the rf-tab-cnt still presists its undesired padding in the tab inquestion
even when the new class inherits it.
For example:
<rich:tabPanel>
<rich:tab id="firstTabId" name="myStyle">
</rich:tab>
</rich:tabPanel>
Again the padding from rf-tab-cnt is not removed.
Any other suggestions, I greatly appreciate it.
-
3. Re: Extend richfacees rf-tab-cnt css class?
ibstmt Jul 26, 2012 12:25 PM (in response to s.santilli)Regardless, what you are doing will not work. Richfaces component styles are determined by either the underlying CSS style built into RF, or by "style" or "styleClass" attributes. Using "id" or "name" has nothing to do with styles (unlike, say, a <div statement).
-
4. Re: Extend richfacees rf-tab-cnt css class?
s.santilli Jul 26, 2012 1:58 PM (in response to ibstmt)Hi Ibstmt,
Thank-you again
Richfaces component styles are determined by either the underlying CSS style built into RF, or by "style" or "styleClass" attributes.
Using "id" or "name" has nothing to do with styles (unlike, say, a <div statement).
Yes agreed, hence the purpose of this post ... I thought it would be beneficial for documentation
purpose to illustrate my train of though and what my end desire is.
Previously (in a past life, lol), I've came across instances where it is possible to apply CSS to only selected
element id's. I was hoping the same could be done with richface ... OR ... at the very least extend
a richfaces css class, again in my ultimate attempt to override the padding associated with the richfaces
tab rf-tab-cnt css class.
At mentioned, none of these avenues have worked ... should any others come to
mind, I extend my gratitude.
Thanks