For paying clients, my preference is ems, %, then px... but then a lot of what I write has to deal with locked-down Internet Exploder 6 and 7, with a few 5.5 usees sprinkled in for that old-skool flavour. Blecccccccch.
I used ems predominantly earlier in my career, but I am almost exclusively using px now due to the preciseness of it. While I also use % where it has its place I am not sure that would belong in a poll such as this because I am not sure anybody exclusively uses it when designing.
Sebastian Green - 14 years ago
In the past em was the best so that users could adjust the size of the text in the browser. Now though most modern browser can efectivley zoom so PX is a better option.
As always though, no one solution is perfect. There will always be someone out there using an old browser.
There's no one-size fits all, you've got to use different units in different situations. I generally use px for divs and site layout, with % occasionally where it needs to be more fluid. Then I set body {font-size:100%;} and use ems for all other font-sizes, as ALA recommends.
I use them all depending on the agent.. Everyone starts with pixels because everyone can add 1+1. The end-game is ems and %, just look at the Opera, Fennec, Firefox, and Seamonkey web browsers to see that the highest levels use fluid measurements. It's fun to debate, but it's not-so-much a debate when the code is staring you in the face.
Peter - 14 years ago
I've never seen a single problem w/ IE6 & px's, and I've been doing CSS since '01 or so. Not sure where people are getting this "legacy IE requires em" stuff. You must be doing it wrong imho.
And f___ your framework. %'s just lead to a mess. I _might_ use a % on one element every 30 stylesheets or so.
I can see the case for em's and mobile, but mobile is
Always %!
I HATE px. Please STOP using px based layouts! Check out my framework: http://en.myfreeweb.ru/why-i-dont-like-css-grids
Jelmuhr - 14 years ago
It depends... I like px, but the prob is.. it is so damn static. I really love webpages that are filled on my whole screen, and not just half (or less) my screen. Plus on the other hand, on netbooks px causes the webpage most of the time to be too big. % are nice but will sometimes give a real headache and does not always work well. vw, vh or vm can also be very handy!
1: some people actually prefer text-zoom over visual zoom.
2: it helps to build a more "flexible" layouts and css, certainly when speaking visual elements not possible (even with css3).
I mostly use pixel sizes in structures (columns, headers, blocks), and em for fonts. I think that experience as Print Designer drives me to use fixed sizes (control freak?), but I'm trying to fix that view.
chris - 14 years ago
Sorry, I should have shortened that url, slow thinking.
Every situation is different and things are changing rapidly -
http://bit.ly/5J6rM8
and
http://bit.ly/mithf
Tomás Mayr - 14 years ago
Pixels mostly, if its a fluid layout, % for some widths.
DStt - 14 years ago
Dryan is right, a pixel is a pixel, which makes it a standard for working on screen bar none. Any absolute distance you're talking about should be in pixels.
Percentages should be dealt with if you want a variable distance, just because you don't want to be limited by formatting to one screen size.
Every situation is different and things are changing rapidly - http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/HiDPIOverview/Introduction/Introduction.html#//apple_ref/doc/uid/TP40003409-CH4-DontLinkElementID_50 and
http://developer.android.com/guide/practices/screens_support.html
It depends.
If the website is being accessed across different screen resolutions, like a mobile UI and a 24" monitor, em will help.
Since mobile users are increasing, a website should cater all kinds of resolutions. So I prefer em.
And there will be specific scenarios where we will be forced to use px instead of em.
Though I use px a lot, % and em play a part. It just depends on what its for.
Ben - 14 years ago
I currently use a px/em hybrid. Em for typography, pixels for div measurements. But I am slowly transitioning into using ems full time but with a 62.5% css reset.
Khainestar - 14 years ago
It depends on the site design. Some designs have to be px as that is how the designer has made them. I prefer to use % or em though. The design flows nicer then.
Mike - 14 years ago
Pixels is the way to go, through I still use percentages on font sizes only to support legacy IE. We have a site that is hit by a lot of departments that still are stuck on IE6, so we need to make sure things work and are accessible for them.
It depends on the project. There's no one-size-fits all solution when it comes to good web development - and this is true for all aspects of the craft. Mostly I use a combination of EM and px.
For paying clients, my preference is ems, %, then px... but then a lot of what I write has to deal with locked-down Internet Exploder 6 and 7, with a few 5.5 usees sprinkled in for that old-skool flavour. Blecccccccch.
I used ems predominantly earlier in my career, but I am almost exclusively using px now due to the preciseness of it. While I also use % where it has its place I am not sure that would belong in a poll such as this because I am not sure anybody exclusively uses it when designing.
In the past em was the best so that users could adjust the size of the text in the browser. Now though most modern browser can efectivley zoom so PX is a better option.
As always though, no one solution is perfect. There will always be someone out there using an old browser.
Im not a designer...and i can't measure so much of the web element!
so, i use px for easier calculations
Its got to be the Pixel. Using % is ok but if your creating fluid layouts I question your design skills!
There's no one-size fits all, you've got to use different units in different situations. I generally use px for divs and site layout, with % occasionally where it needs to be more fluid. Then I set body {font-size:100%;} and use ems for all other font-sizes, as ALA recommends.
I use them all depending on the agent.. Everyone starts with pixels because everyone can add 1+1. The end-game is ems and %, just look at the Opera, Fennec, Firefox, and Seamonkey web browsers to see that the highest levels use fluid measurements. It's fun to debate, but it's not-so-much a debate when the code is staring you in the face.
I've never seen a single problem w/ IE6 & px's, and I've been doing CSS since '01 or so. Not sure where people are getting this "legacy IE requires em" stuff. You must be doing it wrong imho.
And f___ your framework. %'s just lead to a mess. I _might_ use a % on one element every 30 stylesheets or so.
I can see the case for em's and mobile, but mobile is
Always %!
I HATE px. Please STOP using px based layouts! Check out my framework: http://en.myfreeweb.ru/why-i-dont-like-css-grids
It depends... I like px, but the prob is.. it is so damn static. I really love webpages that are filled on my whole screen, and not just half (or less) my screen. Plus on the other hand, on netbooks px causes the webpage most of the time to be too big. % are nice but will sometimes give a real headache and does not always work well. vw, vh or vm can also be very handy!
Ems all the way.
1: some people actually prefer text-zoom over visual zoom.
2: it helps to build a more "flexible" layouts and css, certainly when speaking visual elements not possible (even with css3).
I mostly use pixel sizes in structures (columns, headers, blocks), and em for fonts. I think that experience as Print Designer drives me to use fixed sizes (control freak?), but I'm trying to fix that view.
Sorry, I should have shortened that url, slow thinking.
Every situation is different and things are changing rapidly -
http://bit.ly/5J6rM8
and
http://bit.ly/mithf
Pixels mostly, if its a fluid layout, % for some widths.
Dryan is right, a pixel is a pixel, which makes it a standard for working on screen bar none. Any absolute distance you're talking about should be in pixels.
Percentages should be dealt with if you want a variable distance, just because you don't want to be limited by formatting to one screen size.
Every situation is different and things are changing rapidly - http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/HiDPIOverview/Introduction/Introduction.html#//apple_ref/doc/uid/TP40003409-CH4-DontLinkElementID_50 and
http://developer.android.com/guide/practices/screens_support.html
I define the main body font-size as a pixel and Em after. If there is any strangeness I use pixels.
Depends, for font size: EM, for structure: PX, for fluid content: % :)
On layout, not text elements.
I learnt, that you should use em, because of the IE(6), but this rule is crap in my eyes. So I use px as well.
I often using px, even sometimes also using %.
Always em's for font sizing, and a combination of px and % for container size and position.
A px is not always a pixel.
I use a combo of them all, based on the YUI CSS grids concepts.
It depends.
If the website is being accessed across different screen resolutions, like a mobile UI and a 24" monitor, em will help.
Since mobile users are increasing, a website should cater all kinds of resolutions. So I prefer em.
And there will be specific scenarios where we will be forced to use px instead of em.
Depends on what I'm doing. But I tend to use px. most
Though I use px a lot, % and em play a part. It just depends on what its for.
I currently use a px/em hybrid. Em for typography, pixels for div measurements. But I am slowly transitioning into using ems full time but with a 62.5% css reset.
It depends on the site design. Some designs have to be px as that is how the designer has made them. I prefer to use % or em though. The design flows nicer then.
Pixels is the way to go, through I still use percentages on font sizes only to support legacy IE. We have a site that is hit by a lot of departments that still are stuck on IE6, so we need to make sure things work and are accessible for them.
It depends on the project. There's no one-size-fits all solution when it comes to good web development - and this is true for all aspects of the craft. Mostly I use a combination of EM and px.
Px but I use % for widths. :-)
A pixel is always a pixel.
As soon as IE supported pixel resizing, any level-headed designer went PX.