Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Input field background picture?

    Is it possible to apply a background picture to an input field? If so, could you post example code on how to work that?

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,448
    Thanks
    11
    Thanked 598 Times in 578 Posts
    <input style="background-image:logo.gif" value="text here" size="29" type="text" />
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,252
    Thanks
    203
    Thanked 2,557 Times in 2,535 Posts
    Something like this:-

    <style type="text/css">
    <!--
    INPUT { background-color: teal}
    TEXTAREA { background-image: url(image.gif)}
    .special { background-color: red; }

    -->
    </style>


    <form name ="myform">
    Your Name:
    <INPUT type="text">
    Your Message
    <TEXTAREA cols="20" rows="10"></TEXTAREA>
    <INPUT class="special" type="submit">
    </form>
    Last edited by Philip M; 12-09-2007 at 09:25 AM. Reason: Typo


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •