Html Button with CSS Width Style Code
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET"type="text/css"href="web.css">
<title>web design</title>
</head>
<body>
<h1>Set Button Width</h1>
<button class="button button1">25px</button><br>
<button class="button button2">50%</button><br>
<button class="button button3">100%</button>
</body>
</html>
CSS Width Style Code
.button{
background-color: green;
color: #fff;
border: none;
padding:15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button1{width:25px;}
.button2{width:50%;}
.button1{width:100%;}
No comments:
Post a Comment