Results 1 to 9 of 9

Thread: new problem, cannot BOLD the font

  1. #1
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default new problem, cannot BOLD the font

    This is my code in HTML
    Code:
    <table class="tblStyle"><tr><td>
    <b>text in bold</b> text in normal
    </td></tr></table>
    And this is my code in css style sheet
    Code:
    .tblStyle{
    font: 10 arial;
    }
    the effect i expect was: text in bold text in normal
    but, at the end the effect is: text in bold text in normal

    it looks like css style sheet has corrupt the display. can someone tell me how to solve this?

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I just tested this, and it does work. I don't see what the problem is
    - Mike

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    .tblStyle{
    font: 10 arial;
    }
    10 what? 10 pixels high? 10 ems? 10%? 10 miles?
    Also, you should always specify a generic font in case the user doesn't have that font.

    Code:
    .tblStyle{
      font: 110% Arial serif;
    }
    
    .tblStyle b {
      font-weight: bold;
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I don't think he/she wants the whole thing to be bold.
    - Mike

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I'm sure s/he doesn't. I suspect s/he wants the <b> element to be bold, as I've specified in that style.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Oh, right.. its 2:00 in the morning, im half asleep right now, and i'm missing details.
    - Mike

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    04:12 here
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    I'm sure s/he doesn't. I suspect s/he wants the <b> element to be bold, as I've specified in that style.
    you're right, i don't want the whole element to be bold

  9. #9
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yeah, but he set the bold html element, (in the css) to be bold, regardless of what the class does to it.

    Ex

    You make a class, for div.

    Code:
    <style type="text/css">
    .blah {
    font:12px arial
    }
    </style>
    </head>
    <body>
    <div class="blah">Test</div>
    but, you can also define element properties in the style sheets

    Code:
    .blah b {
    font-weight:bold
    }
    - Mike

Bookmarks

Posting Permissions

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