Curiosity, learning and homework help
11/10/2024
Sign upLog in
Language: FR | ENG

> Back to the home page <

Discussion forums

[HTML/CSS] Taille d'un input d'un formulaire HTML dans un css
You have to be logged in to reply
Author Message
SuperMoi

Member
Posted on 28/12/2020 at 18:30:01

by SuperMoi
Member
Bonjour,

J'ai un formulaire HTML et un input comme ça:
<input type="email" name="mail" id="mail" size="30" placeholder="pseudo@mail.com" />

J'essaye de mettre la taille dans mon fichier css et donc j'ai défini une class comme ça:
.formulaire_email
{
size: "30";
}

et j'ai changé mon input comme ça:
<input class="formulaire_email" type="email" name="mail" id="mail" placeholder="pseudo@mail.com" />

mais ça ne marche pas! 🙁

Pouvez-vous m'aider?
TheLibrarian

**Moderator**
Posted on 28/12/2020 at 19:50:27

by TheLibrarian
**Moderator**
Salut!

En fait, je ne pense pas que l'option size existe. En tout cas, je ne connais que l'option width.

Je pense qu'il faudrait que tu définisses ta classe dans le fichier css de cette façon:
.formulaire_email
{
width: 100px;
}

Et là, ça devrait fonctionner.
Essaye et dis-nous. 😉
--------------------------
SuperMoi

Member
Posted on 28/12/2020 at 21:15:18

by SuperMoi
Member
Ah oui, ça marche comme ça. Merci. 🙂
You have to be logged in to reply
Share this page on social media:

Use of cookies on this website:
- If you are not a member of this website, no cookie is intentionally stored on your computer.
- If you are a member of this website, cookies are only used to keep your connection after each visit. This option can be deactivated at will in your profile and is deactivated by default.
- No other information is stored or retrieved without your knowledge, neither your personal information nor any other whatsoever. If in doubt, do not hesitate to contact the administrator of this website .
- Even this information banner does not use cookies and will therefore be displayed constantly on each visit on all pages of the website.