K
Kate
I was just wondering which is better to use in my css px, pt or em?
Many thanks in advance,
Kate
Many thanks in advance,
Kate
Kate said:I was just wondering which is better to use in my css px, pt or em?
I was just wondering which is better to use in my css px, pt or em?
Barbara de Zoete said:Those are units to define a length value for a proporty for a selector in
CSS. Fully depends on what selector (perhaps combined with what property).
For example, I use:
em for sizes of boxes;
px for sizes of borders (mostly) --> Always a bad idea for font size
(Google for tons of posts with the reasons);
pt --> never (I see no point ;-) . pt is nice on paper, not in screen
media IMO);
% just when it seems appropriate if selector needs to have a dimention
that is % of parent.
See? So what length are you needing? What selector? What property?
Everything that both yourself and Beauregard mentioned. I was
unsure as to which I should use for which.
i.e.:
Text, Position, Widths, Borders you get the idea. I have read so many
conflicting p.o.v. That I became more confused than when I first started
looking into it.
Barbara de Zoete said:I see. Well, all starts with the design concept. If you go for fluid or
liquid (see <http://www.google.com/search?q=liquid+design>), you will love
proportional units for just about everything. If you use proportional
units (like em and %), your pages' design will adapt to any screensize and
zoom ration by adjusting all parts relatively to eachother.
If you need something to be fixed, go with px. But please do not use them
for font size, for reasons Beauregard mentioned.
Was this of any help at all?
Kate said:I was just wondering which is better to use in my css px, pt or em?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.