Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 11th, 2003, 05:50 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
CSS for File field in a form???

I have written a style sheet that has styles for the TEXT field and for the BUTTON. But when it comes to the FILE field is there a way that I can write a style that would add different styles to the textbox and the button? Here are the styles that I have written for the TEXT field and the BUTTON. I need a way to write it for the FILE field. Any suggestions??

Code:

.txtboxes {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #000000;
	background-color: #FFFFFF;
	border: 1px ridge #000000;
}

.buttons {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #CC0000;
	background-color: #FFFFFF;
	border: 1px ridge #CC0000;
}

Reply With Quote
  #2  
Old November 11th, 2003, 06:29 AM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: CSS for File field in a form???

nazly,
I don't think you can change the colour of the browse button in file input element.:uhoh:
But it is possible play with the text field which the filename displays.
Code:
<html>
<head>
<title>Untitled Document</title>
<style>
input
	{	margin-top: 3px;
		font-size: 11px;
		background: #ff0000;
		margin-bottom: 3px;
		color: #ffffff;
		font-family: arial, helvetica, sans-serif;
	} 
</style>
</head>
<body>
<form>
<input type="file" size="20" name="file1" style="width:80%">
</form>
</body>
</html>

Look here :
http://www.cs.tut.fi/~jkorpela/forms/file.html#present

Same kind of thread going on here :
http://forums.devshed.com/t26278/s.html

Reply With Quote
  #3  
Old November 11th, 2003, 06:46 AM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: CSS for File field in a form???

I just tried all of this in file input type. But no luck, everything styles only the textfield, not the browse button...
Code:
<input type="file" style="border:0; color:#FF0000; background-color:#efefef; font-family:Verdana; text-align:right; text-decoration:line-through; cursor:help">

Reply With Quote
  #4  
Old November 11th, 2003, 07:47 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: CSS for File field in a form???

Thats not what I wanted.. I have gone through all that.. Is there a way to use the styles that I have written for TEXT and BUTTON to apply seperately for the textbox and the button of the FILE field.

Reply With Quote
  #5  
Old November 11th, 2003, 10:23 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: CSS for File field in a form???

no you can't style it, and that's a good thing.

if you could style it, you could make it look like something else than a upload button, and you could trick some beginner computer user into uploading some important file...

that would be a big security risk...

Reply With Quote
  #6  
Old November 12th, 2003, 12:05 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: CSS for File field in a form???

I didn't know that there is a big story behind this. The idea is correct but I don't beleive that because of that reason the restriction applies to adding styles to File field.. Correct me if I'm wrong..

I have several text boxes + 2 file field + Submit button in my form where the user can enter product details and upload the product images. The style applies to the text boxes and buttons pefectly. But coz of this File field the whole page design looks kinda messed up.. I have to look for a way to fix this. Coz the design does matter. Any suggestions are welcome..

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > CSS for File field in a form???


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT