Problem with upload control display and behavior

I am having problems with the display and behavior of an upload control where the button is showing up inside the upload text field instead of to the right of it and although it does allow me to browse, it doesn't show the filename and path in the text field portion after I select a file. I would also like to know how to get at the upload button itself to style it like the submit button. All code is here including all styles and there is no .cs code yet

Actually, here is my upload control code. Nothing special

                <b>Select a File to Upload</b><br />
                <asp:FileUpload ID="fu" runat="server" />
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In your styles,

table fu

should be

table .fu

and the control should be written in ASP.NET like

<asp:FileUpload Id="fu" runat="server" cssClass="fu" />

as fu is used for name/ID.  Just specifying fu in styles means that the browser is thinking fu is the name of an element (e.g. <fu/>, like <p>).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Some schools of thought also say that you shouldn't bother styling a file upload element as different browsers render them very differently, and they are unique in their behaviour.
BobHavertyComhAuthor Commented:
Well it does seem to be responding to style attributes now. I suppose that since this control is being generated server side that "cssclass" needs to be used rather than "class". I can live without styling it I suppose. But the upload button is still appearing inside of the text field and it is blocking the file name from appearing inside of the text field. I just published the file again so that you can see it
BobHavertyComhAuthor Commented:
It turns out that the upload button was not covering the text field, it was just a function of some browsers putting the button on the right and some putting it on the left and my color attribute manages what color the text is inside the file upload text field and that color was set to the same color as the background, so the file info was showing up, it just had the same color as the text field background.

You are right about different browsers doing whatever they want. IE gives me an ugly grey background for the text field no matter what. FF and Chrome seem to respond to styles. After reading some articles, it appears to be more of a security issue than anything else and different browsers are going to do whatever they think they need to do with this control. It is possible to still style this, with a lot of hassle and shaky workarounds, but I will leave that for later and at least now I can begin testing your other solution. Excellent, spot on info. Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.