dev@woodstock.java.net

Re: how can i change color in columnheader in table jsf componant

From: richard ratta <Richard.Ratta_at_Sun.COM>
Date: Thu, 05 Jun 2008 08:50:51 -0400

If you are creating two selectors as you indicate, I will speculate,
they will not override a
more specific selector as it is defined in the woodstock style sheet

table.Tbl_sun4 .TblHdrTxt_sun4 {

This selector is more specific. It identifies any element with class
attribute containing
"TblHdrTxt_sun4" as a descendant of any table element with a class
attribute that contains
"Tbl_sun4".

In other words with HTML like

<table class="Tbl_sun4" ....>
    <td class="TblHdrTxt_sun4" ...>

You're selectors will not "win" in this case.

If the HTML were

<table ...>
    <td class="TblHdrTxt_sun4" ...>

and your definitions were seen after the stylesheets then they would win
the match.

The font change possibly works because the style sheet just uses a class
selector in one case

.TblHdrTxt_at_THEME_CSS@, .TblMultHdrTxt_at_THEME_CSS@, .TblGrpTxt_at_THEME_CSS@ {
        font-weight:bold;
}

In another case however your selector may lose

table.Tbl_at_THEME_CSS@ th.TblMultColHdr_at_THEME_CSS@ .TblHdrTxt_at_THEME_CSS@
{font-wei
ght:normal;}

In the color case the selectors are all descendant selectors

table.Tbl_at_THEME_CSS@ .TblHdrTxt_at_THEME_CSS@ {
        color:#000000;
        text-decoration:none;
        background:#E1E5E8 url(../images/table2/column_gradient.png)
repeat-x ce
nter top;
}

table.TblLt_at_THEME_CSS@ .TblHdrTxt_at_THEME_CSS@ {
        background-color:#E1E5E8;
        color:#000000;
        text-decoration:none;
        background-image:url(../images/table2/column_gradient.png);
        background-position:center top;
}

These selectors are from the current woodstock build.


-rick


Mattana Sayankuldilok wrote:

> i use table jsf componant in netbean 6.1 and i overide the stylesheet
> .TblColHdr_sun4{
> font-weight: regular;
> color: #FFFFFF;
> }
>
> .TblHdrTxt_sun4 {
> font-size: 16px;
> color:rgb(255,255,0);
> }
>
>
> and the font weight can change but color can not change .. i dont
> understand why ..Please anyone help me about this problem..thanks
>
>
> ------------------------------------------------------------------------
> Get news, entertainment and everything you care about at Live.com.
> Check it out! <http://www.live.com/getstarted.aspx%20>