How to add a colored border to a button with CSS?

CSSWeb DevelopmentFront End Technology

To add colored border, use the CSS border property.

Example

You can try to run the following code to add a colored border.

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         .button {
            background-color: yellow;
            color: black;
            text-align: center;
            font-size: 15px;
            padding: 20px;
            border-radius: 15px;
            border: 3px dashed blue;
         }
      </style>
   </head>
   <body>
      <h2>Result</h2>
      <p>Click below for result:</p>
      <button class = "button">Result</button>
   </body>
</html>
raja
Published on 23-May-2018 12:15:10
Advertisements