How to style download buttons with CSS?

CSSWeb DevelopmentFront End Technology

Following is the code to style download buttons with CSS −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
button{
   background-color: rgb(78, 15, 129);
   border: none;
   color: white;
   padding: 12px 30px;
   cursor: pointer;
   font-size: 30px;
   font-weight: bolder;
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
button:hover{
   background-color: rgb(42, 7, 82);
}
h1{
   text-align: center;
}
</style>
</head>
<body>
<h1>Download Buttons Styling Example</h1>
<h1>Button 1</h1>
<button style="margin-left:33%;"><i class="fa fa-download"></i> DOWNLOAD NOW</button>
<h1>Button 2</h1>
<button style="text-align: center; width: 100%;"><i class="fa fa-download"></i> DOWNLOAD NOW</button>
</body>
</html>

Output

The above code will produce the following output −

raja
Published on 08-Apr-2020 12:17:01
Advertisements