0
How to style a form ?
How can I style a form ?
7 Antworten
+ 6
of course you can, it is very easy with css
try those
border, width, weight, border radius,...
+ 5
just create a normal form
+ 2
You can set id, class, to help you to target elements, but you can do without also...
If you have:
<body>
<div>
<p>some text</p>
<p>some text</p>
<p>some text</p>
</div>
<p>some text</p>
</body>
You can target the second <p> by setting it an id or a class, or:
div p:nth-child(2)
But this selector will target all <p> that are 2nd child of a div... you can precise also the child ordering of the div, but since the selector grow up in complexity/verbosity, you will be advised to use id or class ;)
That's exactly the same with forms elements ^^
+ 1
and some more addition: background, color, padding, margin, font-style etc
0
but I have to create a div ? and then style the div ?
0
but to style I have to create an ID, class something, yeah ?
0
yes, thank you