+ 1
How can I modify the height and width (or shape, too, if possible) of an input form in HTML??
3 Réponses
+ 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 ! :))
+ 2
Thank you, Wiktor. I will try this.
+ 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 :)