File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes CSS with Struts-html tags. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "CSS with Struts-html tags." Watch "CSS with Struts-html tags." New topic
Author

CSS with Struts-html tags.

prakash chauhan
Ranch Hand

Joined: Jun 22, 2007
Posts: 81
Hi All,
I want to apply styles to my struts-html tags
for eg:
in jsp:
---------------------------------------------
<html:link action="home">HOME</html:link>
----------------------------------------------

and in my css i want to use something like this:
-------------------------------------------------
#navigation html:link.active{
background-color: #ABC;
}
---------------------------------------------------

can we do it? it does not seem to be working , anything wrong with the code?
-Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

CSS is a client-side technology, Struts is a server-side technology. Your CSS knows nothing about your Struts tags. These tags get translated into HTML which is sent to the browser. It is that HTML that your CSS must match.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
prakash chauhan
Ranch Hand

Joined: Jun 22, 2007
Posts: 81
thanks.
So does that mean that i can't use my struts-html tags with CSS?
any work arounds?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Moving to our Struts forum.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CSS with Struts-html tags.
 
Similar Threads
Tiles - Forward problem
Are there any javascript thing in struts aside from client side validation?
doesnt display struts tags in normal html form
CSS with Struts-html tags.
How to have output of tag handler processed by struts tag handlers?