-
1. h:inputText +styleClass not working
jonask May 2, 2011 6:51 AM (in response to mada_harikrishna)hey, mustn't the class names be the same?
If you name ur class "form_input_sml" you have to access it with
.form_input_sml {
...
...
}
-
2. Re: h:inputText +styleClass not working
mada_harikrishna May 2, 2011 6:57 AM (in response to jonask)Thanks for immediate responding,
I wrongly posted the line <h:inputText value="AMXL" styleClass="form_input_sml" /> instead of 'form_select'
Actually the code is <h:inputText value="AMXL" styleClass="form_select'" /> only.
The style class is not getting applied. I am using rich faces tags also in this page. Will it cause any effect.
Regards,
Hari
-
3. h:inputText +styleClass not working
jonask May 2, 2011 7:35 AM (in response to mada_harikrishna)i dont think so.
For me its working with (width,height), but some attributes are being ignored(color, font-size), i don't know why...
my code:
<h:body>
<h:form>
<h:outputStylesheet name="style.ecss" />
<h:inputText value="AMXL" styleClass="form_select" />
</h:form>
</h:body>
.form_select {
color: #FF0000;
border: 1px solid #c9c5ba;
background-color: #FFFFFF;
margin: 0px;
height: 50px;
width: 300px;
font-size: 20px;
}
--WebContent
---resources
----style.ecss
---index.xhtml
-
4. h:inputText +styleClass not working
lfryc May 2, 2011 8:33 AM (in response to jonask)Hari, could you please check that the browser see the generated resources (HTML+CSS) as you expect?
It means there is <input type="text" class="form_select" /> generated from <h:inputText .... />
and also HTML page refers to CSS resource with .form_select rule?
-
5. h:inputText +styleClass not working
mada_harikrishna May 2, 2011 8:38 AM (in response to jonask)Hi,
You are correct, height and width are applied but remaining styles were not applied.
-
6. h:inputText +styleClass not working
mada_harikrishna May 2, 2011 8:41 AM (in response to lfryc)Hi,
I checked by looking at browser view source also, it is displaying with styleclass, only height,width were applied, but remaining styles were not applied.
Can you suggest what could be the reason, and if I put
input[type="text"] {
border: 1px solid #c9c5ba;
background-color: #FFFFFF;
margin: 0px;
height: 20px;
width: 155px;
font-size: 11px;
color: #333333;
}
this in css, it is working properly.
-
7. Re: h:inputText +styleClass not working
lfryc May 2, 2011 9:30 AM (in response to mada_harikrishna)Hi Hari,
could you please use Firebug "CSS" tab [1] to determine which styles are applied?
It is possible that some of there styles are simply rewritten by some definitiions with higher priority.
You can find some reference for this tool on Dzone Ref Card [2].
[2] http://refcardz.dzone.com/refcardz/getting-started-firebug-15
-
8. Re: h:inputText +styleClass not working
mada_harikrishna May 3, 2011 2:20 AM (in response to lfryc)Hi,
Thanks. I have used firebug now. PFA image.
In the image it is showing that only some parts of the styleclass is applying and remaining were striked.
and you can also observe
input
[type="text"]
is present at the top and the color is not applied.
-
css file.JPG 90.9 KB
-
-
9. Re: h:inputText +styleClass not working
lfryc May 3, 2011 4:47 AM (in response to mada_harikrishna)Hari, I will reproduce your issue at own and give a feedback to you then.
-
10. Re: h:inputText +styleClass not working
lfryc May 9, 2011 3:43 AM (in response to lfryc)Hari, could you please try to apply !important [1] for your style and see if it helps?
-
11. Re: h:inputText +styleClass not working
mada_harikrishna May 9, 2011 6:41 AM (in response to lfryc)Hi Lukas Fryc,
Thank you very much. It really helped me to come out of this problem.
Actually this problem raised because of using richfaces skinning mechanism. In the skin properties styles were declared already,
so richfaces is trying to override the applied styles for individual component with defined skin properties.
But due to this option, I am able to ovverride the skin property. Thanks......