You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Jay Wang <cw...@loyola.edu> on 2009/02/11 19:59:58 UTC

password field size issue on Internet Explorer

Wonder if anyone has a solution or know what is going on.
I have two fields 
Login - TextField
Pwd - PasswordField 
Both were set to have the same size, say, 20. 
It renders fine on Firefox - the length of the fields match and line up.
But on Internet Explorer, the login field is longer than the password field. 
It must have to do with Click's style classes. Anyone has a solution?
Thanks!
-- 
View this message in context: http://n2.nabble.com/password-field-size-issue-on-Internet-Explorer-tp2310613p2310613.html
Sent from the click-user mailing list archive at Nabble.com.


Re: password field size issue on Internet Explorer

Posted by Bob Schellink <sa...@gmail.com>.
Jay Wang wrote:
> Bob,
> Thank you very much for your help! The setWidth() method works great for me!
> I will be able to publish my web site on the internet soon and will share it
> with everyone here.


Thats great. If you want there is now a "Powered by Click" wiki 
page[1]. Feel free to edit it and upload screenshots. (Let me know if 
you have permission issues when editing the wiki.)

kind regards

bob

[1]: http://cwiki.apache.org/confluence/display/CLICK/Powered+By+Click

Re: password field size issue on Internet Explorer

Posted by Jay Wang <cw...@loyola.edu>.
Bob,
Thank you very much for your help! The setWidth() method works great for me!
I will be able to publish my web site on the internet soon and will share it
with everyone here.
Click is such a great product, I wish I knew it sooner after so many years
of developing Java web application using Struts, Spring Web and JSF. We
really need to be the words out.
Jay

sabob wrote:
> 
> Hi Jay,
> 
> Jay Wang wrote:
>> Wonder if anyone has a solution or know what is going on.
>> I have two fields 
>> Login - TextField
>> Pwd - PasswordField 
>> Both were set to have the same size, say, 20. 
>> It renders fine on Firefox - the length of the fields match and line up.
>> But on Internet Explorer, the login field is longer than the password
>> field. 
>> It must have to do with Click's style classes. Anyone has a solution?
> 
> 
> Click has a default control.css style which basically formats the 
> <table> markup in which fields are placed. Don't think the input 
> fields themselves are touched by this stylesheet.
> 
> My guess is another stylesheet is included which causes this. One 
> issue you might have run into with IE is if font-size is specified but 
> no font-family. So you could try the following in your stylesheet:
> 
>    #myform input {
>      font-size: 10pt;
>      font-family: Verdana;
>    }
> 
> where #myform is the ID of your Form.
> 
> 
> An alternative is to use CSS "width" attribute:
> 
>    field.setWidth("200px");
> 
> 
> However the most flexible way to style controls is to set a CSS class 
> attribute and use an external stylesheet to apply styles as needed. 
> This gives you complete control of how you want things to look like.
> 
>    passwordField.addStyleClass("password-style");
>    textField.addStyleClass("text-style");
> 
> and in your stylesheet you would have:
> 
>    .text-style, .password-style {
>      width: 200px;
>      ... other styles can come here
>    }
> 
> 
> kind regards
> 
> bob
> 
> 

-- 
View this message in context: http://n2.nabble.com/password-field-size-issue-on-Internet-Explorer-tp2310613p2312621.html
Sent from the click-user mailing list archive at Nabble.com.


Re: password field size issue on Internet Explorer

Posted by Bob Schellink <sa...@gmail.com>.
Hi Jay,

Jay Wang wrote:
> Wonder if anyone has a solution or know what is going on.
> I have two fields 
> Login - TextField
> Pwd - PasswordField 
> Both were set to have the same size, say, 20. 
> It renders fine on Firefox - the length of the fields match and line up.
> But on Internet Explorer, the login field is longer than the password field. 
> It must have to do with Click's style classes. Anyone has a solution?


Click has a default control.css style which basically formats the 
<table> markup in which fields are placed. Don't think the input 
fields themselves are touched by this stylesheet.

My guess is another stylesheet is included which causes this. One 
issue you might have run into with IE is if font-size is specified but 
no font-family. So you could try the following in your stylesheet:

   #myform input {
     font-size: 10pt;
     font-family: Verdana;
   }

where #myform is the ID of your Form.


An alternative is to use CSS "width" attribute:

   field.setWidth("200px");


However the most flexible way to style controls is to set a CSS class 
attribute and use an external stylesheet to apply styles as needed. 
This gives you complete control of how you want things to look like.

   passwordField.addStyleClass("password-style");
   textField.addStyleClass("text-style");

and in your stylesheet you would have:

   .text-style, .password-style {
     width: 200px;
     ... other styles can come here
   }


kind regards

bob