How can i make a button that looks like the one that says +Ask Question?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • WebBoy
    New Member
    • Feb 2013
    • 4

    How can i make a button that looks like the one that says +Ask Question?

    I have already tried one code but didnt really work. this is the code
    Code:
    <div> <input type="button" value="Button Text" style="border-style:none;" /> </div>
    . I want the button to be a flat HTML 5 button but can't figure out how to do it.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You didn't set the background color and color of the text. Also, you should avoid inline sytles.

    Comment

    • WebBoy
      New Member
      • Feb 2013
      • 4

      #3
      Is this the right code?
      Code:
      <div> <input type="button" value="Button Text" background="Blue" text color="Black" /> </div>
      I hope i did that right.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You should be able to tell if that's right or not by looking at the result.

        Comment

        • WebBoy
          New Member
          • Feb 2013
          • 4

          #5
          It stil shows the normal button style not the flat button. Would you be able to tell me what i am doing wrong. And how i can fix it? I want it to be the HTML5 flat button.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Why don't you just right click and Inspect Element (where supported)?

            If you're using Firefox, get Firebug. Chrome has a decent built-in inspector. You can also use Firebug Lite for other browsers. There are also other tools.

            Comment

            • Rabbit
              Recognized Expert MVP
              • Jan 2007
              • 12517

              #7
              That's because you didn't do your style correctly. That and you're still trying to inline your styles when you should avoid that whenever possible.

              Comment

              • Exequiel
                Contributor
                • Jul 2012
                • 288

                #8
                Code:
                <div> <input type="button" value="Button Text" style="background: blue; color: white; padding: 5px; text-shadow: 0px 1px 1px; box-shadow: 1px 2px 3px rgba(1,4,3,0.3);" /> </div>
                try that code . . . observed and try it. . .

                Comment

                • Exequiel
                  Contributor
                  • Jul 2012
                  • 288

                  #9
                  try to learn css3. . . search it in google. . .
                  Last edited by Exequiel; Feb 8 '13, 01:35 PM. Reason: wrong spelling

                  Comment

                  • WebBoy
                    New Member
                    • Feb 2013
                    • 4

                    #10
                    Ok thanks Rabbit for the tip. And thanks Exequiel for the code it worked.

                    Comment

                    Working...