Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSS with Struts-html tags.

 
prakash chauhan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
prakash chauhan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.
So does that mean that i can't use my struts-html tags with CSS?
any work arounds?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic