Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6586477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:47:44+00:00 2026-05-25T16:47:44+00:00

I have a problem of IE8 support with <input type=file> on a php page

  • 0

I have a problem of IE8 support with <input type="file"> on a php page displaying an image, which when clicked on opens a file browser to choose a file to upload.

This works fine with Firefox and Chrome and I am pretty sure the problem comes from <input type="file"> and its support with IE8. The result on IE8 is that the image does not get displayed and that if I click on the white rectangle sitting in place of the image nothing happens…

Here is the code:

<div class="file_wrap">
   <input id="file" type="file" name="file" onchange="sendfile();" />
</div>

And the CSS:

.file_wrap {
   background: url('icon/add.gif');
   overflow:   hidden;
   width:      116px;
   height:     147px;
   cursor:     hand;
}

.file_wrap input {
   opacity:    0;
   font-size:  999px;
   cursor:     hand;
}

Maybe some of you guys came across that before?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:47:44+00:00Added an answer on May 25, 2026 at 4:47 pm

    Custom styling of the <input type=file> element is explicitly discouraged.

    Firstly, its default look and feel is completely different across the various browsers (you didn’t mention Safari, which also renders it very differently from the other browsers). This alone would make it quite hard to style it nicely.

    But more importantly, most browsers actively prevent a number of standard CSS and Javascript actions from working with file elements, because of potentital security issues.

    Some Javascript is prevented in order to avoid malicious scripts from intercepting or changing the filename and path. The implications of what could happen if this were allowed are fairly obvious.

    In addition, the element generally only allows a fairly minimal amount of styling using CSS. This is because malicious pages were styling the element to make it look less like a file element, and thereby tricking users into uploading files that they shouldn’t have been uploading.

    This page provides further reading on the subject, and gives tips on styling it successfully.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have IE 7 + 8 and page which has <meta http-equiv=Content-Type content=text/html; charset=utf-8
I have a problem with the following code in an ASPX page: <script type=text/javascript>
I have a problem with IE8 and the opening of a new window with
I have this problem in IE8 that ignores my first stylesheet link. I don't
i have a problem in ie8, my site is http://www.2sinfotech.com/demo/guitar// when i click on
I have a problem with my website in IE8 (6 and 7 also I
I have out of order display problem in IE6 and IE8. Following is the
I have a problem with IE8, when put a div with overflow: auto only
i have a strange problem with IE8 installed in xp. i was trying to
I have a problem with the Mootools get method and IE8. This is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.