开发者

Custom CSS doesn't get applied when using <h:head> instead of <head>

if I put:

<head>
//..
</head>

<body>
//..
</body>

The style from my CSS is applied correctly, but when I change to :

<h:head>
//..
</h:head>

<h:body>
//..
</h:body>

My style it seems wrong some parts of CSS.

Why this is happenning ?

Update: To simplify my proble开发者_JAVA百科m i'm show two images below:

Without

<h:head>.. <h:body> (this is the correct CSS style)

Custom CSS doesn't get applied when using <h:head> instead of <head>

With

<h:head>..<h:body>

Custom CSS doesn't get applied when using <h:head> instead of <head>

I just change to and the same thing to and this error happens.

I'm new about JSF, there's something that i have to do ?

Update 2: I'm using Rich Faces 4, one thing that i realized was that appears one script include in the end of tag:

<link type="text/css" rel="stylesheet" href="/brainset/rfRes/skinning.ecss.xhtml?db=eAHL6rC8BQAEkAIG">

I didn't put that, and this only appears with

> <h:head> ... <h:body>

tags. I think that my style is overridden by RichFaces include this 'skinning.ecss'.


The RichFaces 4 was overridden my style,so to disable skinning we have to use parameters as below:

<context-param>
    <param-name>org.richfaces.skin</param-name>
    <param-value>plain</param-value>
</context-param>
<context-param>
    <param-name>org.richfaces.enableControlSkinning</param-name>
    <param-value>false</param-value>
</context-param>

And this solve my problem ;)

Source

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜