Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Browse File Input Default Styling

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30392
    noahgelman
    Participant

    Is there a way to style the ‘browse file’ input? The file path box isn’t the problem, it’s the ugly ‘browse’ box. Hopefully there’s a CSS way to do it, but if not, what are my javascript alternatives?

    #78861
    noahgelman
    Participant

    Yeah, i can target it like that. I can also just target it with ‘input’. They work the same. But CSS doesn’t seem to be very consistent with it.

    Such as, If I tell it border none and background red, it’ll take off the border of the file path box and make its background red.

    But if I do height 100px the browse button grows to 100px and the input box stays the same height.

    #78844
    Bob
    Member
    #78845
    noahgelman
    Participant

    Ah, i see, they wrap it in a div and give that div a background image, and then they set the actual file uploader to 0 opacity so it looks like it’s styled. That’s very clever.

    Although I’m a bit disappointed that it doesn’t have an easier way to style it.

    #78846
    Bob
    Member

    This link seems to have some nice info about it as well: http://www.quirksmode.org/dom/inputfile.html

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.