Viewing 2 replies - 1 through 2 (of 2 total)
  • Styling of Upload / Add File is largely contolled by the selected browser unless you use Javascript to override this – see https://stackoverflow.com/questions/4909228/style-input-type-file

    Thread Starter Anonymous User 13982730

    (@anonymized-13982730)

    Ok, thanks, I′m going to look it. It is a bit hard for me to follow those steps, so I have created this solution.

    As my problem is that the text “No file selected” is wider that my space, for example, my sidebar or wider that the space in a mobile device I have done this:
    I have created a rule in css in my childtheme for that input like this:
    {width: 100%;}
    To avoid any conflicts with other inputs, when editing my form, I′ve added a id to that input like this:
    [file file-574 id:id-attachemnt]
    So the css rules appears like this:
    #id-attachment {width: 100%;}

    The results are that when there is enuogh space to show the text it appears:
    “No file selected”
    And when there is not enough space, ir appears like this:
    “No file….ted”

    For me has been enuogh well solution and easier than the option of Javascript in stackoverflow, not as good but enough.
    Hope this will help anybody.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No file selected in a new line’ is closed to new replies.