PDA

View Full Version : Diffs between specified height and resultant height



MakFracta
22 Feb 2010, 11:33 AM
Hi

My form has its designer, so the user can change de size/position of the FieldSets and save them on server side.

When I recreate the form I use this settings to set the size/position to the FieldSets, it works so,so, because the FS doesn't seem to get the height right, although width, left and top are correct. There is a change also across browsers.

For example:
if height = 69,

Then the height I can measure with IE tools and photoimpact is:
In IE = 73. (+4)
In FireFox and Chrome = 62. (-7)

For some reason, when I change the size manually and read the size of the FieldSet (using JavaScript: fieldSet.getBox().height) I got 69, then I specify this number using the next code:

var fieldSet = new Ext.form.FieldSet({
{
........
,layout : 'absolute'
,height : 69
........
}

or

fs.setHeight(69);

And I get this new measures (+4 in IE, -7 FF & Chrome).

Do you want something more weird? ok.

Debugging step by step, and immediatly after the line: fs.setHight(69); I check the fs.getBox() and I get: height = 79(!!!).

I substract 10 to 69, and I get a similar measures than FF & Chrome. (!!!)

I don't use special CSS, styles or any other than the ExtJS framework itself.

Any idea of what is happening?, is there any way to ensure the consistency of the height across browsers, without detecting browser and add/substract constants?

Top, left and width seems to be ok.

Thanks
Marco

tobiu
22 Feb 2010, 12:47 PM
do you use IE in quirks mode?
which html-box-model do you use?

in general, ie and other browser interprete margins and paddings differently when ie is in quirks (adding to max-size VS subtracting).


kind regards,
tobiu

MakFracta
22 Feb 2010, 2:33 PM
mmm, now I get my :-? face.

Sorry for my ignorance, what is that "quirks mode" and what is the "html-box-model"?
I guess I need some research.

Thnks

tobiu
22 Feb 2010, 3:16 PM
http://en.wikipedia.org/wiki/Quirks_mode

could be a start.

i meant IE8 used in "IE7-mode", but it is quite common, that browers interprete margins, padding etc. differently. especially if you do not set a model to render html.


kind regards,
tobiu