+ 1

How can I modify the height and width (or shape, too, if possible) of an input form in HTML??

13th Mar 2017, 6:23 PM
sarahlavish
sarahlavish - avatar
3 Answers
+ 2
Oh its a easy way I try to explain it for you: Example: <form id="name"></form> In CSS: #name{ width: 200px; (width of block element) height: 50px; (height of block element) border-radius: 20px; (circle-like borders) } In JS: (load function when window ready) window.onload = function(){ var handler = document.getElementById('name'); (access to html element like to other object) handler.style.width= 200px; handler.style.height=50px; handler.style.borderRadius= 20px; }; If you have questions I'll try answer ! :))
14th Mar 2017, 6:32 AM
Wiktor K.
Wiktor K. - avatar
+ 2
Thank you, Wiktor. I will try this.
14th Mar 2017, 6:34 AM
sarahlavish
sarahlavish - avatar
+ 2
in CSS you write: background-color, font-size And if you styling elements in JS remember that: You need to use camelCase letters :) -> backgroundColor -> fontSize etc :)
14th Mar 2017, 7:17 AM
Wiktor K.
Wiktor K. - avatar