From 68951f54fc23b946bfa99638b59d4b71d421e060 Mon Sep 17 00:00:00 2001 From: ahmedsaif2002 Date: Tue, 21 Feb 2023 02:27:13 +0000 Subject: [PATCH] Form Controls file Form Controls page has been done. --- Form-Controls/index.html | 33 +++++++++++++++++++- Form-Controls/styles.css | 66 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 4344b144..5f4877c3 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -16,12 +16,43 @@

Product Pick

+ + + + + + + + + + + + + + + + +
diff --git a/Form-Controls/styles.css b/Form-Controls/styles.css index e69de29b..67803b74 100644 --- a/Form-Controls/styles.css +++ b/Form-Controls/styles.css @@ -0,0 +1,66 @@ +/* Style the form label */ +label { + display: block; + margin-bottom: 0.5rem; + font-weight: bold; + +} + +/* Style the form input and select elements */ +input, +select { + padding: 0.5rem; + font-size: 1rem; + border-radius: 0.25rem; + border: 1px solid #ccc; + width: 100%; +} + +/* Style the submit button */ +button[type="submit"] { + background-color: #007bff; + color: #fff; + border: none; + border-radius: 0.25rem; + padding: 0.5rem 1rem; + font-size: 1rem; + cursor: pointer; +} + +button[type="submit"]:hover { + background-color: #0069d9; +} + +/* Style the form elements when they are in focus */ +input:focus, +select:focus { + border-color: #007bff; + outline: none; +} + +/* Style the error message */ +input:invalid, +select:invalid { + border-color: #070707; +} + +input:invalid:focus, +select:invalid:focus { + border-color: #201e1e; + outline: none; +} + +/* Style the error message text */ +input:invalid+span, +select:invalid+span { + color: #1c1a1a; + font-size: 0.8rem; + display: block; + margin-top: 0.25rem; +} + +/* Hide the error message by default */ +input+span, +select+span { + display: none; +} \ No newline at end of file