GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-Mar-2004, 13:40
erniegerdie erniegerdie is offline
Junior Member
 
Join Date: Feb 2004
Location: England
Posts: 70
erniegerdie will become famous soon enough

Styling the browse button...


Is there any way to style the browse button, which comes as part of the input type file.

You can change the style of a button i.e.:

CSS Code:
input[type=button] {
   ....
}

But this has no effect on the browse button, also changing the style fo input[type=file] does not make any difference.
  #2  
Old 07-Mar-2004, 13:46
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
Can you post the code for the browse button. Post the entire form code if you can. I will see what I can do with it.
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business.
  #3  
Old 07-Mar-2004, 14:02
erniegerdie erniegerdie is offline
Junior Member
 
Join Date: Feb 2004
Location: England
Posts: 70
erniegerdie will become famous soon enough
I just want to change the style of the browse button for that tag.

So I'll just give you this:
HTML Code:
<html> <body> <form id='f1' name='dummyform'> <input type='file' name='imagefile' size='50'> </form> </body> </html>

Good luck!
  #4  
Old 07-Mar-2004, 14:12
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
HTML Code:
<html> <body> <form id='f1' name='dummyform'> <input type='file' name='imagefile' class='input' size='50'> </form> </body> </html>

For the CSS:
CSS Code:
.input{
	border:1px solid #88A0C8; 
	font-family: Arial
	font-size: 11px; 
	color: #003068; 
	text-decoration: none; 
	background-color: #E9EDF0
}
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business.
Last edited by BobbyDouglas : 07-Mar-2004 at 14:51.
  #5  
Old 07-Mar-2004, 14:22
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Interesting question, definitely something to research...
  #6  
Old 07-Mar-2004, 14:44
erniegerdie erniegerdie is offline
Junior Member
 
Join Date: Feb 2004
Location: England
Posts: 70
erniegerdie will become famous soon enough
Hi Bobby,

Your code will only style the text field that comes with the file tag. By the way think style should be class in your CSS code.

Its not text field that I want to style, its the actual button.
  #7  
Old 07-Mar-2004, 14:51
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
By the way think style should be class in your CSS code.
- Yes it should be class.

Your code will only style the text field that comes with the file tag.
- What do you want to style then? Do you want to add borders to the button? A background color? The above code will do that.
  #8  
Old 07-Mar-2004, 15:05
erniegerdie erniegerdie is offline
Junior Member
 
Join Date: Feb 2004
Location: England
Posts: 70
erniegerdie will become famous soon enough
Take a look at this link:

http://www.thebasement.madsims.net/s...ileupload.html

The code for this page is:

HTML Code:
<html> <head> <style> <!-- input{ border : 1px outset #88A0C8; font-family: Arial font-size: 11px; color: #003068; text-decoration: none; background-color: #E9EDF0 } //--> </style> </head> <body> <form id='f1' name='dummyform'> <input type="button" value="button"> <input type="file" size="50"> </form> </body> </html>

Note that the look of the button changes, but the look of the browse button which is associated with the input type file does not.

I want to change the look of this browse button.
  #9  
Old 08-Mar-2004, 07:26
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
All I have been able to change so far:

HTML Code:
<html> <head> <style> <!-- input{ border : 1px outset #88A0C8; /*plus whatever else you want styled*/ } .uploadbox{ border : 1px outset #88A0C8; height: 17px; /*change to whatever size you prefer*/ } --> </style> </head> <body> <form id='f1' name='form1'> <input type="button" value="button"> <input type="file" class="uploadbox" size="50"> </form> </body> </html>

Additional information about browse buttons.
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business.
  #10  
Old 08-Mar-2004, 09:20
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
I didn't know that you could comment with // inside CSS? I thought it was only /**/
 
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
radio button problem zuzupus MySQL / PHP Forum 1 08-Aug-2003 03:25
using a button to change table contents. demtro MySQL / PHP Forum 20 02-Mar-2003 15:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:08.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.