palAlaa
palAlaa

Reputation: 9858

Difference between em and px in font-size

I read in w3school - font-size property that the difference between using em and px is that when using px IE doesn't support resizing but em does.

I am working on IE7 and it works fine with px and re-size the text when zooming the page.

can any one explain this to me ?

Upvotes: 1

Views: 3170

Answers (3)

dwalldorf
dwalldorf

Reputation: 1379

px can be resized in IE as well. em is a relativ size to the inherited size by it's parent element and actually has the same meaning as %.

I don't think you can take any advantage by using em instead of px.

Upvotes: 3

Rich
Rich

Reputation: 7214

From memory, IE7 will scale / zoom the whole page, but if you select "Page/Text Size" from the menu to change the text size, that is when px or other absolute units are not scaled whereas relative units (eg: em's) are.

I expect you are doing a zoom rather than a Page/Text Size?

Upvotes: 0

icktoofay
icktoofay

Reputation: 129011

I believe old versions of Internet Explorer have this problem, but new versions fixed it. By the way, W3Schools is often considered a bad resource.

Upvotes: 1

Related Questions