SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make a few word bold in button text?

    Let's say I want to create button with the text "I am Superman"
    Code:
    <input type="button" value="I am Superman" name="B3">
    However, I want the word "Superman" to be BOLD. How to do that?

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just edit the text property in css which should make it work, but first, you might want to specify an id or a class to the button.
    Code:
    <input type="button" value="I am Superman" name="B3" id="bold" />
    Code:
    #bold{
     font-weight: bold;
    }

    EDIT
    : Sorry, I didn't see that you only wanted the word 'superman' to be bold. Follow Egor's suggestion.
    Last edited by kefeso; Jul 29, 2006 at 19:30.
    In search of the clouds...and maybe some work

  3. #3
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    HTML Code:
    <button>I am <b>Superman</b></button>

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Egor, but I'm not sure
    HTML Code:
    <button>
    is widely supported enough.

    Is it safe to use it?

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by janetsmith
    Is it safe to use it?
    Yes.

  6. #6
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)


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
  •