]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/Add_label_to_search_form_input_field.mdwn
on css suckitude
[ikiwiki.git] / doc / todo / Add_label_to_search_form_input_field.mdwn
index dbe024a866fb21e688f3b91b8e01c51a6fc5ef62..43810460f6707c3d44ca1ddcc20005817584beee 100644 (file)
@@ -22,4 +22,29 @@ The patch below adds a label for the field to improve usability:
 >> <http://universalusability.com/access_by_design/forms/auto.html> for
 >> an explanation why. --[[HenrikBrixAndersen]]
 
+>>> If you really want to do this, this is one way:
+
+    --- searchform.tmpl.orig        Sat Aug 25 11:54:28 2007
+    +++ searchform.tmpl     Sat Aug 25 11:56:19 2007
+    @@ -1,6 +1,6 @@
+     <form method="get" action="<TMPL_VAR SEARCHACTION>" id="searchform">
+     <div>
+    -<input type="text" name="phrase" value="" size="16" />
+    +<input type="text" name="phrase" value="Search" size="16" onfocus="this.value=''" />
+     <input type="hidden" name="enc" value="UTF-8" />
+     <input type="hidden" name="do" value="hyperestraier" />
+     </div>
+
+> That's both nasty javascript and fails if javascript is disabled. :-)
+> What I'd really like is a proper search label that appears above the
+> input box. There is free whitespace there, except for pages with very
+> long titles. Would someone like to figure out the CSS to make that
+> happen?
+> 
+> The tricky thing is that the actual html for the form needs to
+> still come after the page title, not before it. Because the first thing
+> a non-css browser should show is the page title. But the only way I know
+> to get it to appear higher up is to put it first, or to use Evil absolute
+> positioning. (CSS sucks.) --[[Joey]]
+
 [[wishlist]]