 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set the width of a button with CSS
To set the button width, use the CSS width property.
Example
You can try to run the following code to set the width of a button −
<!DOCTYPE html> <html>    <head>       <style>          .btn {             background-color: yellow;             color: black;             width: 120px;             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 = "btn">Result</button>    </body> </html>Advertisements
 