PDA

View Full Version : Textfield 'height' Crossbrowser issue



Enew
18 Nov 2010, 3:59 PM
Hi,

Can any one tell how to fix the height of textfield in IE and Firefox.
If i try to mention the height,it works correctly in FF but not in IE.In IE it looks bigger.

Thanks:)

Enew
19 Nov 2010, 6:22 AM
Can anybody please reply...:)

Screamy
19 Nov 2010, 6:35 AM
In Internet Explorer's menus, check View -> Text Size and make sure the default of 'Medium' is selected. Also ensure that View -> Zoom is set to 100%.

Enew
19 Nov 2010, 8:05 AM
Hi,

Thanks for reply.
Everything is correctly as you said.I am facing this issue only in IE6 and IE7.In IE8 and FF its working perfectly.
I tried even mentioning height in %.Its not working.

Enew
19 Nov 2010, 11:04 AM
Can anyone help please....

Enew
2 Dec 2010, 3:58 PM
Hi
can any one tell me how to do it?
I tried using style: {
"height": Ext.isIE7 ? "14px;" : "18px;",
"margin-left": Ext.isIE7 ? "150px;" : "30px;"
},
But its not working,iam getting some errors.can anyone tell how to use Ext.isIE?

Thanks:)

Condor
3 Dec 2010, 4:47 AM
It's not specifically IE7! It's border-box mode: (Ext.isIE6 || (Ext.isIE && !Ext.isStrict))

The difference is that IE adds borders and padding to the final width/height and other browsers don't (unless they switch to border-box mode).

Enew
3 Dec 2010, 5:14 AM
so what is the solution for mine?

Condor
3 Dec 2010, 5:21 AM
Don't do this with styles.

Instead, give your field a 'cls' and write css rules based on this class that change the field height.

Have a look at ext-all.css to see which rules affect the field height (there are lots of browser-dependant rules!).

Enew
3 Dec 2010, 7:25 AM
Thanks for reply..But iam not clear how you are telling to write the code in css .Iam new to this.Can you please post the code.

Thanks:)

Enew
3 Dec 2010, 12:17 PM
Hi Condor,Can you help in replying this :)

Enew
6 Dec 2010, 4:06 PM
Hi,
I solved myself.
i added the a new class
.ext-ie7 .x-form-text{
padding-bottom:0;
padding-top: 2px;
}

Now it worked perfectly in IE7