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