1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

alternative to pixels for font size

Discussion in 'HTML & Website Design' started by fine0023, Oct 4, 2012.

  1. #1
    I use pixels for font size on my website, but one issue that I've been encountering for a long time is that when I have some text that is inside of a <div> with limited width, the text takes up more space on some browsers than on others. For instance, sometimes on chrome and safari the text will take up nearly all of the space allowed (with only two lines of text, as it's supposed to look), but on another browser such as internet explorer, the text will drop down to a third line because it for some reason goes slightly longer.
    What I am getting at is that I would like the text to take up the same amount of room no matter which browser so I don't have to check different browsers each time I edit text such as this on my website to see if it stays to two lines (or however many I want it to have). I assume this has something to do with using pixels for font size in css. As much as I don't want to change everything on my site, it would be nice to only have to check one browser to see if text fits inside of a certain area whenever a change is made. Would using em's or some other alternative solve this problem? Or does this issue have nothing to do with the type of font size used?
    fine0023, Oct 4, 2012 IP
  2. GMF

    GMF Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    This article I found might help
    Code (markup):
    GMF, Oct 4, 2012 IP
  3. HBz

    HBz Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    HBz, Oct 4, 2012 IP