Font Size question

Hi,

Im using this font code on my site

<font size="2" face="Verdana, Arial, Helvetica, sans-serif">

I now have a lot of pages and I was thinking of switching to css. To make the work more easy.

I use this code

font-family: Verdana, Arial, Helvetica, sans-serif; 
font-size: 12px;

But if I compare the font size it doesn’t seems to be the same.
I think it’s because i use px in the second css code.
I’d like to know how much pixels is font size=2 ?

I did a quick Google and came up with a few results… it seems there aren’t really any definite sizes that are exactly the same.

However, I did find this for you: http://www.motive.co.nz/resources/webfonts.html

Here is the google I used: http://www.google.com/search?q=<font+size%3D"2">+CSS+equivalent&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8

no there aren’t. actually kind of goofy, but in regular size 8px is
9px in css. and the spacing is different as well…

you just have to play with teh sizes to fit your design needs. soon
you will have it down and it will be easy to do. Like most things,
I guess. =)

instead of picels, use points.

I think that refers to the original 12point font size…

(or I could be wrong, I have popcorns waiting for me ;))

yeah I dont think there is a comparison… and it seems css sizes are much more flaky cross-platform/broser than html font sizes. So what could be the same on one browser on one OS may not be the same on another browser on another OS. I try to stick to font tags when possible.

but there are a lot of units you can play with in style sheets too… theres percent, inches, centimeters, em’s, ex’s, points, picas, and pixels (I think thats most if not all of them). I personally use pixels - just because I know them better in the bitmap world (I don’t know how accurately they’re represented). But I guess you can just play with them and see for yourself.

if you use font tags, you also allow the user to do the ctrl+scroll thing.

CSS locked text will not do this.

It’s useful if you use a particular size text on a design, and any other size text will screw it up… :slight_smile:

I always use CSS… :slight_smile: