Forums

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

Home Forums CSS Remove Input File Message

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #184408
    wolfgang1983
    Participant

    I would like to know if there is a way to restyle the input file upload image button and remove the no file selected message.

    I have tried changing bootstraps file upload to button but not work.
    <code></code>
    <button type=”file” name=”image” value=”<?php echo $image;?>” size=”20″ role=”button” class=”btn btn-primary”>Upload Image</button>
    <code></code>

    <label for=”input-image” class=”col-sm-2 control-label”>Image</label>

    <br>
    <input type=”file” name=”image” value=”<?php echo $image;?>” size=”20″ role=”button” class=”btn btn-primary”>

    #184413
    __
    Participant

    button elements cannot have type=file. The only allowed values are submit, reset, and button (and “button” doesn’t really mean anything).

    Styling form inputs is really tricky. In some cases (the file input included), there simply isn’t any reliable, cross-browser way to make significant changes to default styling.

    In addition, consider that people expect form inputs to look a certain way in their browser, and changing that look can cause confusion and hurt your UX.

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