Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Nightmare with file upload field
Old 07-04-2008, 10:04 AM Nightmare with file upload field
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Ive been doing some reading around, and have discovered that it is suppose to be a nightmare trying to style a file upload field [which Ive recently learned to deal with].

But Im getting a probem in IE Opera AND Dreamweaver where the field is really wide. Wider than Ive set it to be.
It appears correctly in FF, but I cant seem to change the size of it in anything else??

Here is my code:
Code:
<input name="portImg" type="file" id="portImg" size="20" />
Is there anything in the HMTL I can change to fix it?
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 07-04-2008, 10:37 AM Re: Nightmare with file upload field
johniman7's Avatar
President, JLI Media

Posts: 965
Name: John Irving
Trades: 0
I am not sure how to fix but you may want to try sizing it using css as I have had more luck with css as far as cross browser compatibility.
__________________
Cheers, John Irving: My Blog
JLI Media:
Please login or register to view this content. Registration is FREE
| Website Development (Link Coming Soon!)
johniman7 is offline
Reply With Quote
View Public Profile Visit johniman7's homepage!
 
Old 07-04-2008, 10:44 AM Re: Nightmare with file upload field
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Code:
<input name="portImg" type="file" class="input-box" id="portImg" size="20" />

CSS

Code:
 .input-box{
	font-family:Arial, Helvetica, sans-serif;
	font-size:10px;
	color:#333333;
}
And change to whatever you need
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 07-04-2008, 12:30 PM Re: Nightmare with file upload field
Junior Talker

Posts: 2
Trades: 0
Quote:
Originally Posted by rolda hayes View Post
Code:
<input name="portImg" type="file" class="input-box" id="portImg" size="20" />

CSS

Code:
 .input-box{
    font-family:Arial, Helvetica, sans-serif;
    font-size:10px;
    color:#333333;
}
And change to whatever you need
i do like this
__________________
S
Please login or register to view this content. Registration is FREE
mynameisx is offline
Reply With Quote
View Public Profile
 
Old 07-05-2008, 11:39 AM Re: Nightmare with file upload field
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
No luck. There just seems to be some sort of fixed width applied to it! Ive even tried changing the width property but that doesn't work either.
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 07-06-2008, 06:28 AM Re: Nightmare with file upload field
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
I'm not sure tha I'm following you here...

Are you saying the width of the field is too big?
the size="20" means 20 characters wide, if you changed to "50" its then 50 characters wide...?
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 07-06-2008, 03:03 PM Re: Nightmare with file upload field
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Here is a screenshot of the difference in how it is displayed between FF and IE [Opera looks pretty much the same as IE]

__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 07-07-2008, 12:03 PM Re: Nightmare with file upload field
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Hmmm... I can see now!

Can you post a bit more of the code your using and also the CSS?

When I use the code I posted above, I dont get the big difference between the two browsers...
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 07-07-2008, 01:11 PM Re: Nightmare with file upload field
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
Try giving these a read:
http://www.quirksmode.org/dom/inputfile.html

http://www.michaelmcgrady.com/file_browse_images.jsp
and demo: http://www.michaelmcgrady.com/simple.jsp
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 07-07-2008, 01:41 PM Re: Nightmare with file upload field
angele803's Avatar
Perfectly Imperfect

Posts: 1,772
Name: Stephanie
Location: Oklahoma
Trades: 2
You should be able to define a width through the CSS. So to elaborate on rolda_hayes post:

Code:
 
.input-box{
	font-family:Arial, Helvetica, sans-serif;
	font-size:10px;
	color:#333333;
        width:200px;
}
Of course, change the width to fit your page
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 07-07-2008, 01:46 PM Re: Nightmare with file upload field
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Thanks for the help guys, but Ive somehow managed to crack it! Well, not cracked it exactly, but I basically just remade the page. And now its magically working??

hehe oh well, at least it displays correctly now.

Edit: I noticed just then, when I changed the field's name in Dreamweaver and hit enter, it suddenly turned massive again! So I undone it, and it went back. Then I went into the code there and changed the name and it was okay.

I'm guessing it may just be a Dreamweaver issue, or maybe mixing CS3 with Vista
__________________

Please login or register to view this content. Registration is FREE

Last edited by pealo86; 07-07-2008 at 01:54 PM..
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Reply     « Reply to Nightmare with file upload field
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.24729 seconds with 12 queries