Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

using css with struts 2

Session Mwamufiya

2007-07-31

Replies:

Hi,

I have a page with various strut objects in a form (buttons, textfields, and listboxes), and would like to be able to control the layout. I tried using a css file to set the size and font of buttons:

- my jsp page contains:
<td valign="top">
<s:form target="SMIG_Editor">
  <s:submit value="Add Category" action="CategoryEditor"
   cssClass="actionButton" />
</s:form>
</td>

- I have the following line in my <head> tag:
<link href="render.css" rel="stylesheet" type="text/css">

- my render.css file contains:
input.button {
text-align: left;
width: 100px;
}
input.deleteButton {
 color: red;
}

Any ideas why struts doesn't follow the css instructions?

Also, I've observed that within a <s:form> tag, <br> doesn't actually separate any of the elements in the form; all the spaces appear together at the top of the rendered page, but not where they are supposed to be. For example, if I have three submit buttons, each followed by <br>, I would get a page that started with 3 <br> and then had the 3 buttons clustered together as before.

Any ideas?

Thanks,
Session


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.