How to use CSS in JSPs?
1 posts in topic
Flat View  Flat View

Posted By:   Aarun_Jones
Posted On:   Wednesday, May 11, 2005 06:47 PM

I've some styles defined in a css file and I would like to use them in my jsp file, how can I use that?

Say I've defined th { color:blue }
In jsp, I've used the


And then for th I use
But, when the JSP is rendered I don't see the blue color text. I tried with
Even then I do not see the style I've picked up.

Re: How to use CSS in JSPs?

Posted By:   Sherbir_S  
Posted On:   Monday, May 16, 2005 05:47 AM

Hi Aarun,
Seems u r making a serious basic mistake here !!

In ur CSS file, u define the header "th" or a class "th" ?

Well, if u define the header th directly, then u do not need
2 specify as . The style will automatically be inherited wherever u use the "th" tag in
the JSP.

In case u specify a class for the "th", then I u must do so
in the CSS :


and then in the JSP, where u define the "th" tag, u use:

Hope this Helps...

Cheers !!


About | Sitemap | Contact