+ 3

Customizing HTML Buttons

How do you make a button bigger in html? And how can you position it (css, html)

8th Sep 2017, 10:55 AM
Jason Wade
Jason Wade - avatar
5 Respostas
+ 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.
8th Sep 2017, 11:05 AM
Maz
Maz - avatar
+ 4
try out the buttons I used here :- https://code.sololearn.com/WLiljO0Pp74o/?ref=app
8th Sep 2017, 11:34 AM
RZK 022
RZK 022 - avatar
+ 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; }
8th Sep 2017, 11:07 AM
khaled AbdulBasit
khaled AbdulBasit - avatar
+ 3
Thank you!
8th Sep 2017, 6:46 PM
Jason Wade
Jason Wade - avatar
+ 1
it's helpful. thanku
8th Sep 2017, 5:45 PM
Denuka Nirmalee