+ 3
Customizing HTML Buttons
How do you make a button bigger in html? And how can you position it (css, html)
5 Réponses
+ 9
You can use Css to change its dimensions (see the second example).
To change the position you can create a container and use the text-align property:
1 - E.g
<div style="text-align: center">
<button>Click</button>
</div>
... you can also use the positioning (static, relative, absolute, fixed)
... you can also set the display property and remove the container:
2 - E.g
<button>Click</button>
<style>
button {
width: 150px;
height: 40px;
margin: 0 auto;
display: block;
}
</style>
... you can also search on Google and take the solution most suitable to your project, there are many different (and probably better) ways to do what you want to do.
+ 4
try out the buttons I used here :-
https://code.sololearn.com/WLiljO0Pp74o/?ref=app
+ 3
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
+ 3
Thank you!
+ 1
it's helpful. thanku