Jump to content

sizes please?


mpoer

Recommended Posts

what am I supposed to do to define font sizes. is it differant than for images sizes? what's up with this. these are the ways I know of: em, %, pt, px, and there may be others, still.so what do i use, when, and how?

Link to comment
Share on other sites

while its useful knowing them all (and i dont :) ), i would use the most common ones.% and pxpercentage and pixels.i always use them 2, and not the others. i believe they are more universal, especially in images and photoshop. if you use the same one for everything, then you've got a better idea when writing the code on what its going to look like and can use it better on how things are going to look with other things.as for text, since some people alter the text size on their browser, for instance people who cant see very well they have bigger text, so, i would go for "small, smaller, larger" etc.. compared to 'normal' sized text...i'm not sure if it works as i haven't tested it out, so someone with more experience can probably answer that better, like the relative text sizes stay the same..

Link to comment
Share on other sites

To be 100% accessibility compliant you should use em.
I've read that before at least once, but how do i use 'em' and where and such?
Link to comment
Share on other sites

To be 100% accessibility compliant you should use em.
I've read that before at least once, but how do i use 'em' and where and such?

1em is about "normal" size for a browser.So for example, instead of having something like font-size:12px you could have font-size:1emAlso, if you put em's in your images, they will scale with text when making text larger.
Link to comment
Share on other sites

I'm a bit curious on this topic too. I've tried using em's before, but it ended up really big and unmanageable.test.html1em --> 2em is quite a noticable difference, isn't it?

Link to comment
Share on other sites

Here is an example.This gos between the <head> and </head> tags, or you can make it an inline code.<style type-"text/css">body{font-size: 13px; }</style>With this code, anything within the <body> and </body> tags will be 13px text size.I use pt alot aswell, but I would stick with px

Link to comment
Share on other sites

you can do decimal numbersĀ  1.1em, etc.

yep, and to make them smaller than 1em you can have 0.9em, 0.8, etc.Also, em's inherit any em's before it in the parent elements.So if you have 0.8 as the body font size and in a paragraph within the body if you have 1em the size will be similar to that of a normal 0.8 em.plus, 1em in <h1> will be larger than 1em in <p> because heads are larger by default so format of a head will inherit into the em.
Link to comment
Share on other sites

okay, that stuff makes sense :)ems it is, I think. I'll be experimenting with a site i'm working on now.I'd still like a link to a good tutorial, though, anyone of you know of any?

Link to comment
Share on other sites

  • 3 weeks later...

just some feedback: I started using some em sizes for fonts in my last web site and it turned out very well. It was easy to manage and very scalable, so I'm happy with it. I still find myself using px and percentages for images and div.widths, though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...