ling
ling

Reputation: 1675

CSS in JSF templating

I am seeing CSS template examples in JSF. For example,

In search.css:

#search {    
    color: #00cc66; 
}

In index.xhtml:

<ui:define name="search">
            <h:messages />
...
</ui:define>

So the search.css will apply to the "search" section defined in index.xhtml. But what exact html tags do the search.css apply to in the defined search section on a page? "search" is not a html tag. I am confused.

Upvotes: 0

Views: 90

Answers (1)

BalusC
BalusC

Reputation: 1109635

CSS runs in web browser.

JSF runs in web server, producing HTML output.

CSS does not see server side source code.

CSS only sees HTML DOM tree.

For CSS, JSF is just a HTML code generator.

Right click page in browser and do View Page Source or Inspect Element.

Write your CSS based on that HTML.

Upvotes: 1

Related Questions