newceylon Posted June 17, 2008 Share Posted June 17, 2008 I have seen that web developers uses 'pixel' and 'em' for define the sizes of elements.I want to know, are there how many pixals to a em and how many em's to a pixal.for ex:0.7em equals to how many pixels ?Can any one please. Link to comment Share on other sites More sharing options...
Ingolme Posted June 17, 2008 Share Posted June 17, 2008 There is no relation between pixels and ems, ems are based on the browser's settings.As far as I know, 1em is equal to the width of the letter m in the browser's default font size. Each browser has their own default font and size. Link to comment Share on other sites More sharing options...
newceylon Posted June 17, 2008 Author Share Posted June 17, 2008 Thanks.I want to edit my blogger template.Not sure that I'll succeed though I know html+css. Link to comment Share on other sites More sharing options...
redwall_hp Posted June 18, 2008 Share Posted June 18, 2008 If you're looking for a "liquid" layout, then you want ems (or percentages). Pixels are generally better for things that will have fixed dimensions. Link to comment Share on other sites More sharing options...
rzea Posted June 18, 2008 Share Posted June 18, 2008 I found this definition which is pretty clear: An em-unit, if you read the specification[1] is described as being equal to the font size of the element. So, if the font size is set to 22px, an em will be equal to exactly 22px. The main advantage to using em-values is that any lengths specified as "X" em will be scaled with the text using common user-agent text resize features...Source: http://archivist.incutio.com/viewlist/css-discuss/34277 Here's a link to the W3C site explaining (I honestly think that the way things are explained in W3C is sometimes SO hard to understand, I hate their explanations ): http://www.w3.org/TR/CSS21/syndata.html#length-unitsCalculator:Here's an Em calculator, kind of cool. According to this calculator 1px = 0.06em: http://riddle.pl/emcalc/--Now, to design websites I learned that the proper way to handle font sizes is by using em instead of px, because with ems the website's font displays proportionate to the browser's default settings, and it also complies with Accessibility in the case the user needs to enlarge the font to read, with pixels the font would stay the same size (although several browser override this too now).Bytes. Link to comment Share on other sites More sharing options...
Synook Posted June 19, 2008 Share Posted June 19, 2008 Technically, one "em" is actually the width of the letter "m" at the current font size.I think you can guess how much one "en" is now Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.