Dave, 

 

Thank you so much for your reply. It is a big relief when hope is shown for
solving the problem.

 

Could you confirm that by your stylesheet overriding approach do you mean to
write some css code for the below "tdLabel" (or "label", if applicable)
class?

 

Qunhuan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

BTW, found a similar problem reporting link:

http://markmail.org/message/hl6mic6scgxaj5lz#query:struts%20cssStyle%20cssCl
ass%20green+page:1+mid:nm6ws7bq2wmbmnl3+state:results

 

 

-----Original Message-----
From: Dave Newton [mailto:newton.d...@yahoo.com] 
Sent: Monday, April 27, 2009 12:41 PM
To: Struts Users Mailing List
Subject: Re: How to turn the struts textfield label from default italic to
normal (struts 2.1.6)

 

 

While I haven't noticed this behavior, you can override the S2 

stylesheet by including your own stylesheet with overriding definitions 

after the S2 head tag.

 

Dave

 

Qunhuan Mei wrote:

> Hi,

> 

>  

> 

> I have a form which uses struts tag “textfield” and “text”. The default
font

> style for label generated for textfield appears to be italic while the one

> for text is normal. 

> 

>  

> 

> e.g. for 

> 

>  

> 

>        <s:textfield key="username" name="userAccount.username"

> required="true" />

> 

>  

> 

> The html code generated by struts are (seen by the browser’s view
source.):

> 

>  

> 

>    <tr>

> 

>          <td class="tdLabel"><label for="form_userAccount_username"

> class="label">Username<span class="required">*</span>:</label></td>

> 

>          <td><input type="text" name="userAccount.username" value=""

> id="form_userAccount_username"/></td>

> 

> </tr>

> 

> The label name “Username” is displayed in Italic (I suppose this is

> controlled by either the tdLabel or label class). 

> 

>  

> 

> I want to change Username’s font style to normal (non-italic) and so have

> tried cssStyle and cssClass for the textfield but it seems they are only

> applied to the input field element rather than the label one.

> 

>  

> 

> I have searched the internet but no luck in finding an answer.

> 

>  

> 

> It would be much appreciated if anyone could help.

> 

>  

> 

> Many thanks in advance,

> 

>  

> 

> Qunhuan

> 

>  

> 

> 

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: user-unsubscr...@struts.apache.org

For additional commands, e-mail: user-h...@struts.apache.org

 

Reply via email to