Jump to content


CSS Font Size

  • Please log in to reply
1 reply to this topic

#1 sanfly

  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationNew Zealand

Posted 25 August 2006 - 08:34 PM

Hi Guys

Using CSS, what is the best type of font size to use (eg: px, em etc) that will display the same font size in both IE and firefox, and also give absolute font sizes (ie: not relative other font sized defined futher up in the stylesheet)

If you're not part of the solution, you're part of the precipitate

#2 Ricklord

  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 26 August 2006 - 02:36 PM


I would use something like font size 12px and font style tahoma with a line height of 140% for my main content of a site.

see below for example style:

content p {
      font-family: Tahoma;
      font-size : 12px;
      font-weight : normal;
      color : #000000;
      background-color : transparent;
      line-height : 140%;

I've never had a problem with this in any browsers. As for having different font sizes for different text just give the style another name. like in my example i have got -content p- for paragraph if i wanted a header i would create another style called -content h1- then -h2- and so on. Naming the styles this way will link to the main container called content so if you have a container called sidebar for news you would use -sidebar p- or -sidebar h1- and so on.

If creating links use -content a- and define the style for the link and then use -content a:hover- to define what the text would look like if you hover over the link.

Also to get rid of the underline which is created in prgrams like dreamweaver add -text-decoration: none;- to the style for links.

Hope this helps.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users