Lieutenant Dan
Lieutenant Dan

Reputation: 8274

Search Field Text doesn't display in FF 3.6?

The Search form is pretty much a styled version off of the default twenty eleven Wordpress one.

The default text display almost everywhere -- but not in FF 3.6, and probably older IE's. I'm assuming because twenty eleven theme by default uses some CSS3 calls with the search. In any case -- whats the traditional code that works across for form field default text, again??

(I'd prefer to do without PHP, jQuery, JS) -- But ultimately which ever route is solid.

Here is the code within search form:

<?php
/**
 * The template for displaying search forms in Twenty Eleven
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?>
    <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
        <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
        <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search, title, author, keyword', 'twentyeleven', 'twentyeleven' ); ?>" />
        <input type="submit" class="submit" name="submit"  id="searchsubmit" value="<?php esc_attr_e( 'Search' ); ?>" />
    </form>

<div id="searchtbtn"><img src="http://mysite.com/wp-content/uploads/2012/03/searchnav_btn.gif" style="margin-left: 292px; margin-top: 60px; max-height: 35px; max-width: 70px; position: absolute;"></div>

Upvotes: 0

Views: 173

Answers (1)

j08691
j08691

Reputation: 207901

The placeholder attribute <input type="text" placeholder="... is part of HTML5 and if you'd like to have a non-PHP, non-jQuery, non-JavaScript fallback, then you can either just set the default value or style it with a CSS background image.

Upvotes: 2

Related Questions