custom form buttons on <input "file"

Discussion in 'CSS' started by .bmp, Jul 13, 2006.

  1. #1
    i cant remember how i done this last time, but when using the <input "file" tag in a form, the auto "browse" button wont accept the css properties that the other buttons have

    if anyone can enlighten me, i think last time i disabled the button, hide it, created and actual "input type="submit"" button customed that and added the post value of the "file" browse button - but this was like 4 years ago

    any help appreciated
     
    .bmp, Jul 13, 2006 IP
  2. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Do you mean styling it?

    In your css file add:
    form input { your style };

    Should style the button individually, but you'll want to make sure the browse button has it's own class by adding ' class="browsebutton" ' after the input type.

    Then in your css styles:

    forum input .browsebutton { your style };
     
    AdamSee, Jul 14, 2006 IP
    .bmp likes this.
  3. .bmp

    .bmp Well-Known Member

    Messages:
    130
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #3
    if you use input type "file" it automatically puts in a browse button, thats the one i want to give the same style as my other input buttons eg submit, but i dont think it is independantly controlable (sp)

    i think its going to have to be a input type text & submit and pass the browse function to the submit type button


    Thanks anyway man :D
     
    .bmp, Jul 14, 2006 IP