#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    456
    Rep Power
    15

    tricky css question


    I thought you could control anything with CSS, but no matter how hard I look I cannot find out how to control something:

    With an INPUT TYPE="FILE" box there is also a browse button. How do you change the font of the browse button?! When you do an INPUT TYPE="FILE" the browse button is created automatically.

    Thanks!! Ryan
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    UK
    Posts
    77
    Rep Power
    14
    I dont understand what your problem is? you can apply styles the same as any other form element.

    You cant apply styles to form elements in Netscape, this doesnt work.

    Use the following and it works fine in Internet Explorer:

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .style { font-family: Arial, Helvetica, sans-serif; font-size: 36px; font-weight: bold; background-color: #FF0000; border-color: #006633 #00FF33 #660000 #66FFFF}
    -->
    </style>
    </head>

    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" enctype="multipart/form-data" method="post" action="">
    <input type="file" name="file" class="style">
    </form>
    </body>
    </html>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    456
    Rep Power
    15
    You can change all that stuff, but if you look closely, the font never changes, in the example you gave, the font is not arial.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    63
    Rep Power
    15
    I don't think you can do it (at the time of writing). If Hotmail can't do it (attachments), then I think it's safe to assume you can't do it (at least in IE).

    Is there anyway you can hide the Browse button and use an image instead and some JavaScript that acts like the Browse button?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    456
    Rep Power
    15
    Yeah... if Hotmail can't do it, it's probably safe to assume that it can't be done.

IMN logo majestic logo threadwatch logo seochat tools logo