You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roland Berger <ro...@plenum-systems.ch> on 2001/11/13 11:26:37 UTC
Cascading Style Sheets for struts tags?
Hi all
How is it possible to use CSS for struts tags? Or does anybody know a better
way than using CSS for formating etc. WEB pages generated with struts and
JSP?
<style type="text/css">
html:text {color: green}
</style>
Does not work with me.
Thanks
Roland
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Cascading Style Sheets for struts tags?
Posted by Brandon Goodin <ma...@phase.ws>.
Best Practice is to create a css folder for your web site/app and create a
*.css file.
Example Directory Structure:
root
|-css
|-mycssfile.css
Link it to your jsp/html pages as an an external style sheet.
Example:
<link rel="stylesheet" type="text/css" href="css/mycss.css">
Create classes within the css file.
Example class:
.aclass { color: #500; font-weight: normal; font-size: 12px; font-family:
Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-decoration: none }
and use the styleClass
Assign your style to the struts html elements using the styleClass attribute
and the name of the class you wish to use.
Example class assignment:
<html:link page="/gohere" styleClass="aclass">A link</html:link>
Brandon Goodin
Phase Communications
P (406)862-2245
F (406)862-0354
http://www.phase.ws
-----Original Message-----
From: Roland Berger [mailto:roland.berger@plenum-systems.ch]
Sent: Tuesday, November 13, 2001 3:27 AM
To: Struts Mailinglist
Subject: Cascading Style Sheets for struts tags?
Hi all
How is it possible to use CSS for struts tags? Or does anybody know a better
way than using CSS for formating etc. WEB pages generated with struts and
JSP?
<style type="text/css">
html:text {color: green}
</style>
Does not work with me.
Thanks
Roland
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>