Opened 16 years ago
Closed 15 years ago
#5285 closed defect (bug) (invalid)
Problematic markup in searchform widget for styling
Reported by: | Wolfr | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
This is the markup for the searchform widget:
<div> <input type="text" name="s" id="s" size="15" /><br /> <input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" /> </div>
Problems:
- The line break (br) makes it impossible to style the widgets to have search input
next to submit, now submit is always underneath the text input
- The submit button doesn't have a class nor id, so you can't style it.
- The naming of the input type text's id is quite problematic
Proposed solution:
<div> <input type="text" name="searchinput" class="input-text" size="15" /> <input type="submit" class="input-submit" value="<?php echo attribute_escape(__('Search')); ?>" /> </div>
- logical class names
- no br element
Change History (3)
Note: See
TracTickets for help on using
tickets.
The name=s is needed, and you can now override the callback function in a plugin if you want to change the rest.