For desktop browser all modern browser uses Zoom functionality so we can use PX but if same site can be seen on mobile then would px not be good for zooming in mobile browsers. or use of px is also fine for mobile browsers.
even if we don't care for IE 6 , should we use em in place of px still if we are not making different site for mobile, same site will be seen on both desktop and mobile phones (iphone, blackberry, windows mobile, opera mini, android etc?
I recommend not to use pixel precision designs generally and particularly when developing for mobile devices. The reasons are simple:
Dan Cederholm's book "Bulletproof Web Design" may not be quite as bulletproof as the title suggests, but it's a really good start for answering your question/ solving your problem.
PX is a fixed pixel size EM is relative to font size
So really, yes you should probably use EM for a lot more of web sites. It will let a user define how large they want there font and your site can scale around it.
However, most web-devs like the more specific PX as they can know exactly how things are displayed relative to each other.
But seeming as desktops and mobiles have such drastically differing resolutions, its probably just going to be easier to redesign your site for mobile browsing.
px
won't be a real actual pixel when the screen is zoomed out on a modern mobile browser. These browsers are effectively emulating a desktop browser with desktop browser-size pixels.So for this type of browser using
px
is no worse than it is for a normal desktop browser. You can do it if you want without major problems, but in both situationsem
is preferable for the main body content, if you can.you can read this article http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/
Pixels are fixed, one pixel will use the same place both on a mobile or on any display. Ems are relative, they are so called because they use the approximate size of the uppercase letter 'M'.
So, yes, you should use ems, since they will be adjusted depending on the screen, and your fonts are likely to fit better with them.
You can use this trick for converting fonts from px to em in your CSS:
Then specify your font sizes like this:
And so on. Then you can convert px to em for your layout at PXtoEm.com.