Jango
Jango

Reputation: 5545

Different width result in different browser $("#div1").width()?

I am using jquery to determine the width of the control:-

$("#div1").width();

There is a difference in width of the div between IE8 (in compatibility view) and Firefox. Width is not same.

e.g ie : 1887 FF : 1898

How to tackle it?

Upvotes: 2

Views: 392

Answers (1)

Marius Schulz
Marius Schulz

Reputation: 16470

I guess the difference between the browsers' display exists because of their different perceptions of the CSS box model. The IE does interprete it another way than Firefox does (e.g. the padding property is treated differently).

Upvotes: 1

Related Questions