Opera and font-weight: bold;

Discussion in 'CSS' started by pitto, Mar 22, 2008.

  1. #1
    I'm trying to make bold a bit of text between 2 span tags:

    <span class="faq">What's your question?</span>
    HTML:
    by using this simple rule in CSS:

    span.faq { font-weight: bold; }
    Code (markup):
    but Opera seems to be ignoring the font-weight rule. I've been toggling back and forth between bold and normal and there is no difference in the text. Every other browser (ie6, ie7, ff, safari) seems to be having no trouble...just Opera. Has anyone had trouble with this before? I've searched the internet and there doesn't seem to be any mention of it but if every browser except Opera handles it fine then it must be the way Opera is interpreting it don't you think?

    Any ideas?
     
    pitto, Mar 22, 2008 IP
  2. Dan_A

    Dan_A Peon

    Messages:
    65
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It works for me in any version of Opera.
    Can you provide a link or the complete html and css?
     
    Dan_A, Mar 23, 2008 IP
  3. pitto

    pitto Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'll attach the frequently asked questions page (FAQ.php) and a stylesheet that contains all the general styles for the page and the faq-specific styles (rainfrog.txt because css isn't a valid attachable file-type I guess). I didn't include all the php-included files to keep things simple. If you feel you need them let me know.

    I've since downloaded the developers console for Opera to see if the font-weight styles are indeed being read by the Opera browser and it seems that they are but the browser just doesn't change the way it displays the text when the style is changed. For example, I was toggling between font-weight: normal and bold; as well as font-weight: 400 and 800. The style that Opera was reading was changing when I inspected it with the developer tool but its appearance wasn't changing at all. Seems very strange to me so any help would be much appreciated.

    Thanks.
     

    Attached Files:

    pitto, Mar 24, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Um, could it maybe be the way Opera is displaying the particular font? Have you tried changing the font family to something else? I've noticed a difference between say Safari and FF as far as bolds go. Safari really bolds the heck out of some fonts.
     
    Stomme poes, Mar 26, 2008 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Uhm, those spans are around an anchor - could the font-weight normal on the a:link and a:visited be interfering somehow? (it shouldn't, or more specifically should only be affecting the parts inside the anchor)

    Though looking at them - should those even be spans, much less inline level elements? They LOOK to me like they should be a header - though without seeing the page live it's hard to say.
     
    deathshadow, Mar 28, 2008 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I haven't looked at the code (no way in HELL I'm doing that on my brother's computer) but if it's an FAQ, I'd be far more comfortable using a definition list for the FAQ than anything else.
     
    Dan Schulz, Mar 29, 2008 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    Whereas I'd never abuse a definition list that way because it's not terms and definitions, but questions and answers.
     
    deathshadow, Mar 30, 2008 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I personally don't limit definition lists to terms and definitions. It's perfect for a list of two things that are related to each other. Esp. a form coming back with the information the client has filled in. dt="label" dd="input". Doesn't seem the same as bashing a nail in with a screwdriver at all. How many of us are writing online dictionaries?
    Dunno if I'd use it for an FAQ unless the answers were really really short (yes/no).
     
    Stomme poes, Mar 30, 2008 IP
  9. pitto

    pitto Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Deathshadow, it looks like you may be right. I changed the font family to Times and toggled the font-weight between bold and normal and there was a very obvious difference whereas the sans-serif font shows no difference at all. Thanks a lot for the help.
     
    pitto, Mar 30, 2008 IP
  10. pitto

    pitto Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Sorry, I read the names wrong. Kudos should go to Stomme poes. Thanks to all of you though.
     
    pitto, Mar 30, 2008 IP