summary refs log tree commit diff homepage
path: root/src/xhtml.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/xhtml.cr')
-rw-r--r--src/xhtml.cr8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xhtml.cr b/src/xhtml.cr
index d53eb04..8db5995 100644
--- a/src/xhtml.cr
+++ b/src/xhtml.cr
@@ -32,9 +32,9 @@ CSS = "
           display: grid;
           grid-template-columns: max-content 1fr 0;
       }
-      form label { margin-right: 1ch }
       form input { margin-bottom: 1ex }
-      .error {
+      form label { margin-right: 1ch }
+      form label.error {
         color: red;
         margin-top: -1ex;
         margin-bottom: 1ex;
@@ -90,8 +90,8 @@ class Page
                 required: "required"
     xml.element "br"
     if error
-      xml.element "label", class: "error" do xml.text "Error:" end
-      xml.element "label", class: "error" do xml.text error end
+      xml.element "label", for: name, class: "error" do xml.text "Error:" end
+      xml.element "label", for: name, class: "error" do xml.text error end
       xml.element "br"
     end
   end