Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,517
    Thanks
    114
    Thanked 110 Times in 109 Posts

    font-weight:200 on opera

    The follwing CSS doesnt seem to work on Opera

    Code:
    .strap_line{
    font-weight:200;
    }
    It doesnt make the text any bolder it seems. Although the more general statmenet

    Code:
    font-weight:bold;
    works it made the text on IE and FF look horrible. Is there anyway around this?
    You can not say you know how to do something, until you can teach it to someone else.

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try strong? I have never seen an integer value for weight! before!

  • #3
    Regular Coder Karen S. Garvin's Avatar
    Join Date
    Nov 2006
    Location
    Maryland
    Posts
    227
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Yes, there is a font-weight property:

    http://www.w3schools.com/css/pr_font_weight.asp


    Interesting. I tried this exercise:

    http://www.w3schools.com/js/tryit.as...yle_fontweight

    and found that Firefox would show a bold font for a font-weight of 700, but didn't seem to do anything with 400. Maybe it's a screen resolution issue?

    Oh, wait. If 400 is defined as "normal," then 200 is light. That's why you're not seeing BOLD. Try changing the number to 700 and see if that's what you want.
    Last edited by Karen S. Garvin; 06-27-2007 at 04:24 PM. Reason: additional info
    ----------------------------------------------
    Karen S. Garvin
    http://ksgarvin.wordpress.com

  • #4
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,517
    Thanks
    114
    Thanked 110 Times in 109 Posts
    It is in the w3 spec however Opera doesnt seem to support it.

    http://www.w3.org/TR/CSS21/fonts.htm...ef-font-weight

    Apparently the numbers have little numercial significants and should be though of as character representation of different levels of font-weight.

    For instance font-weight:350 would be invalid because this is not one of the recognised charactert strings. The only ones we can use are 100, 200, 300, 400, 500, 600, 700, 800, 900.
    You can not say you know how to do something, until you can teach it to someone else.

  • #5
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,517
    Thanks
    114
    Thanked 110 Times in 109 Posts
    Oh i see what you mean.

    Unfortunatly 500 is perfect on IE, FF but on Opera it looks almost like standard font weight

    600 looks almost perfect on Opera but looks hiddeuosly bold on IE and FF
    You can not say you know how to do something, until you can teach it to someone else.

  • #6
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    550?


    (only kidding)

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    While I don't see this as being to big of a deal, if you have to you could use some CSS hack to feed opera different value. Read this: CSS Hacks
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    How the numeric values work relates to the weights available to a font and how the browser chooses to allocate those weights to each of the nine numbers. Further differences in weights may be a result of the font rendering algorithm used or, possibly, from artificial emboldening when the relevant weight is missing from the font.

    For further understanding, you can read about the algorithm used in the CSS2.1 Specification and differences between Apple (including Windows Safari) and Microsoft algorithms. I wouldn’t be surprised if Opera used a unique algorithm.

    If you want a precise rendering, then you should probably use an image format. CSS wasn’t meant for pixel perfection.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #9
    Senior Coder timgolding's Avatar
    Join Date
    Aug 2006
    Location
    Southampton
    Posts
    1,517
    Thanks
    114
    Thanked 110 Times in 109 Posts
    Thanks guys
    You can not say you know how to do something, until you can teach it to someone else.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •