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

南笙酒味 提交于 2020-01-06 17:17:06

问题


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 problem i'm show two images below:

Without

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

With

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

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'.


回答1:


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



来源:https://stackoverflow.com/questions/6928298/custom-css-doesnt-get-applied-when-using-hhead-instead-of-head

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!