0

Hi all - am trying to add a background image to the imput area for file upload for the input fields I have used the below css any solutions will be great.

Thanks in adavance
D

 #content .input-wide
    {
        width: 288px;
        height: 22px;
        margin: 0;
        padding: 6px 5px 6px 27px;
        -webkit-border-radius: 6px;
        -moz-border-radius: 6px;
        border-radius: 6px;
        border: 1px solid #b4b4b4;
        background: #fff url(/media/library/sprite.png) no-repeat -2px -1px;
    }

}
    <form>
    <div>
            <label for="upload">Upload photo:</label>
            <input class="upload input-wide" name="upload" id="upload" type="file">
    </div>
    </form>

`

2
Contributors
2
Replies
13
Views
4 Years
Discussion Span
Last Post by davidjennings
0

CSS will not target file type for image upload

Your title doesn't make sense at all?

What are you trying to do? Upload a image and change the how it looks with CSS?

This has to be a weirdest question I read.

Edited by LastMitch

0

Hi LastMitch, sorry for the confusion.

I have a number of input elements using the class input-wide to add a background image to the input fields in a form which are all working (I have only included the one that is not displaying the background image).

All the other input fields have an input type = text where as the input upload has an input type = file and this is the input field that will not display the background image.

Now from the message I had assumed (wrongly) that it may have been the file type that was causing the problem.

Thanks in advance

D

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.