How to Set the Font Face in Form Text Boxes?

Discussion in 'HTML & Website Design' started by ccano, Nov 24, 2006.

  1. #1
    Hi, how do I set the font face used when people input text into the search field in this code?

    <form id="searchform" method="get" action="<?php bloginfo('url'); ?>/index.php">
    <span>
    <input type="text" name="s" size="28" />
    <input type="submit" value="Search" />
    </span>
    </form>

    Thanks in advance! :D
     
    ccano, Nov 24, 2006 IP
  2. Zeo

    Zeo Active Member

    Messages:
    158
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    60
    #2
    It's easy if u do like this and make it unique:

    <input type="text" name="s" id="s" size="28" />
    <input type="submit" id="searchsubmit" name="searchsubmit" value="Search" />

    You can style it in css:

    #s {
    font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    }

    or #searchsubmit
     
    Zeo, Nov 24, 2006 IP
    ccano likes this.
  3. ccano

    ccano Peon

    Messages:
    211
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Perfect. Thanks :)
     
    ccano, Nov 24, 2006 IP
  4. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i don't think that's a good idea... if you define it as a div id, it would mean that you only have 1 such instance per page.

    i'd go with a class instead:
    
    <input type="text" name="s" id="s" size="28" />
    <input type="submit" class="searchsubmit" name="searchsubmit" value="Search" />
    
    .s { 
          font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;  
    }
    Code (markup):
     
    daboss, Nov 24, 2006 IP
  5. weknowtheworld

    weknowtheworld Guest

    Messages:
    306
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Good technique... help make my site looks COOL... COOLER.. COOLEST.
     
    weknowtheworld, Nov 25, 2006 IP