Change the padding of a button with CSS

CSSWeb DevelopmentFront End Technology

To change the padding of a button, use the padding property.

You can try to run the following code to change the button’s padding


Live Demo

<!DOCTYPE html>
         .button {
            background-color: yellow;
            color: black;
            text-align: center;
            font-size: 15px;
            padding: 10px;
      <p>Click below for result:</p>
      <button class = "button">Result</button>
Updated on 24-Jun-2020 08:10:25