www.webdeveloper.com
Results 1 to 4 of 4

Thread: Button letter color

  1. #1

    Button letter color

    Anyone know how to make just one letter in a button a different color than the rest something like this:

    <grey>P</grey>rint

    Get it? I bet you do. Any help would be great!!!

    I think it may have something to do with this:

    <style type="text/css">
    p:first-letter{
    float:left;color:blue
    }
    </style>
    <p>
    Code One
    </p>

    except I would like this to work for the text inside of a button.

    thanks

    Code One

  2. #2
    Join Date
    Jan 2003
    Location
    Atlanta, GA
    Posts
    571
    <span style="color: grey">F</span>irst letter is grey.
    Is that what you were looking for?

  3. #3
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    What type of button the <button> element, or a submit attribute of the <input> element: <input type="submit" value="Print"> I don't think you can actually manage that with CSS 2 (for the type="submit") the best results I achieved was to transform first letter size, or colour the whole word not just one letter.
    Last edited by Robert Wellock; 03-27-2003 at 09:26 AM.

  4. #4

    It may not be possible

    I was given this code just a second ago:

    <html>
    <head>
    <style type="text/css">
    input{
    color:ff0000;
    }
    </style>
    </head>
    <body>
    <input type="button" value="button">
    </body>
    </html>


    I havent tried it yet but it looks to me like it will be for the whole name, Im going to workon it a bit and try to force it to do as I say. If I some how work it out I'll be sure to post my answer. Thanks to everyone who responed, even the ones who were thinking about it. lol

    Code One

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles