473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HTML problem

Hello,
I have this: <input name="fileUpload" type="file" class="subtitle"
title="GOGOGO" />
In entire application I have buttons customized. The button that
appears with <input type="file"... /is a standard button. How can I
customize it? To be, let's say, coloured in green, orange, or any other
color...

Sep 29 '06 #1
7 1627
"iulian.ilea" <iu*********@gmail.comwrote:
I have this: <input name="fileUpload" type="file" class="subtitle"
title="GOGOGO" />
In entire application I have buttons customized. The button that
appears with <input type="file"... /is a standard button. How can I
customize it? To be, let's say, coloured in green, orange, or any other
color...
That's not really a PHP question. It's a style question, although some
folks might suggest it's an HTML question (argument accepted with
limitations).

<input style="color:#EEEE00;background-color:#FFAA88;border:3px outset #FF0000;" ...

Take a look at one of the CSS newsgroups for help with style
questions...

For PHP...

<?php
$sFGColor = "color:#EEEE00;";
$sBGColor = "background-color:#FFAA88;";
$sBorder = "border:3px outset #FF0000;";
// ...
?>

<?php
// ...
echo("<input style=\"$sFGColor $sBGColor $sBorder\" ... />\n");
// ...
?>

Good luck.

North Carolina Swimming Pool Contractors
http://www.aquaticcreationsnc.com/
Sep 29 '06 #2

Jim Carlock wrote:
"iulian.ilea" <iu*********@gmail.comwrote:
I have this: <input name="fileUpload" type="file" class="subtitle"
title="GOGOGO" />
In entire application I have buttons customized. The button that
appears with <input type="file"... /is a standard button. How can I
customize it? To be, let's say, coloured in green, orange, or any other
color...

That's not really a PHP question. It's a style question, although some
folks might suggest it's an HTML question (argument accepted with
limitations).

<input style="color:#EEEE00;background-color:#FFAA88;border:3px outset #FF0000;" ...

Take a look at one of the CSS newsgroups for help with style
questions...

For PHP...

<?php
$sFGColor = "color:#EEEE00;";
$sBGColor = "background-color:#FFAA88;";
$sBorder = "border:3px outset #FF0000;";
// ...
?>

<?php
// ...
echo("<input style=\"$sFGColor $sBGColor $sBorder\" ... />\n");
// ...
?>

Good luck.

North Carolina Swimming Pool Contractors
http://www.aquaticcreationsnc.com/
:) I tried it before posting here :). The background of the browse
button doesn't change.

Sep 29 '06 #3
"iulian.ilea" <iu*********@gmail.comwrote:
<snip>
:) I tried it before posting here :). The background of the
browse button doesn't change.
....
<input name="fileUpload" type="file" class="subtitle" title="GOGOGO" />
</snip>

Post the rest of the code for what you tried, including what's in the
class="subtitle" style statements, and the DOCTYPE statement at
the top.

--
North Carolina Swimming Pool Contractors
http://www.aquaticcreationsnc.com/
Sep 29 '06 #4
"iulian.ilea" <iu*********@gmail.comwrote:
<snip>
:) I tried it before posting here :). The background of the
browse button doesn't change.
....
<input name="fileUpload" type="file" class="subtitle" title="GOGOGO" />
</snip>

The type="" should be "button" or "submit". See the following code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test</title>
<style type="text/css">
h1 { text-align:center; }
input { clear:both;margin:2px auto;width:200px; }
..specialstuff { color:#000000;background-color:#FF8800;border:3px groove #AAAABB; }
..specialstufftext { color:#000000;background-color:#FF8800;border:3px inset #660000; }
..specialformclass { float:left;width:100%;border:3px ridge #660000;text-align:center; }
p { font-size:8pt;text-align:center; }
</style></head>
<body><h1>Test Input Colors</h1>
<div class="specialformclass"><form name="specialform">
<input class="specialstufftext" type="text" name="filename" value="" />
<input class="specialstuff" type="button" value="SpecialStuff" />
</form></div>
<p><a href="http://www.aquaticcreationsnc.com">North Carolina Swimming Pool Builders</a></p>
</body></html>

North Carolina Swimming Pool Contractors
http://www.aquaticcreationsnc.com/
Sep 29 '06 #5

"Jim Carlock" <an*******@127.0.0.1wrote in message
news:FR*******************@tornado.tampabay.rr.com ...
"iulian.ilea" <iu*********@gmail.comwrote:
<snip>
:) I tried it before posting here :). The background of the
browse button doesn't change.
...
<input name="fileUpload" type="file" class="subtitle" title="GOGOGO" />
</snip>

The type="" should be "button" or "submit". See the following code.
he's referring to a file browse button so the type should be type="file"
just as was said.
unfortunately changing the background on a file browse input deosn't change
the button color in most browsers.
as of right now a solution may be found in the 10th hit searching google for
"html file browse button background-color" without the quotes.
Sep 29 '06 #6
"Johnny" <re*****************@hotmail.comwrote:
>
>:) I tried it before posting here :). The background of the
browse button doesn't change.
...
<input name="fileUpload" type="file" class="subtitle" title="GOGOGO" />
</snip>

he's referring to a file browse button so the type should be type="file"
just as was said.
unfortunately changing the background on a file browse input deosn't change
the button color in most browsers.
as of right now a solution may be found in the 10th hit searching google for
"html file browse button background-color" without the quotes.
Well, its not really a "solution", but it does at least confirm that the
OP's task is impossible in the general case.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Sep 30 '06 #7

"Tim Roberts" <ti**@probo.comwrote in message
news:n5********************************@4ax.com...
"Johnny" <re*****************@hotmail.comwrote:
:) I tried it before posting here :). The background of the
browse button doesn't change.
...
<input name="fileUpload" type="file" class="subtitle" title="GOGOGO" />
</snip>
he's referring to a file browse button so the type should be type="file"
just as was said.
unfortunately changing the background on a file browse input deosn't
change
the button color in most browsers.
as of right now a solution may be found in the 10th hit searching google
for
"html file browse button background-color" without the quotes.

Well, its not really a "solution", but it does at least confirm that the
OP's task is impossible in the general case.
You are so right, I guess I was suggesting that what solutions are available
can be found by googling. For instance look at this code snippet I found
which works in IE using javascript but it doesn't work in FF:

<html>
<head>
<style>
<!--
#button{
/* browse button styling... */
background-color: red;
}

#fileselect{
visibility:hidden; /* hides the input file tag from view */
} -->
</style>
<script type="text/javascript">
function transferfilename(sfilename) {
document.getElementById('fname').value = sfilename;
}
</script>
</head>
<body>
<form id="f1" method="post">
<input type="file" id="fileselect"
onchange="transferfilename(this.value);">
<input type="text" id="fname" value="">
<input type="button" id="button" value="Browse..."
onclick="fileselect.click()">
</form>
</body>
</html>
Oct 1 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Hansan | last post by:
Hi all, I hope you have time to help me out a little. My problem is that I want to combine some python code I have made with some html templates, I found a tutorial at dev shed:...
2
by: nanookfan | last post by:
Hi all, I'm having a bizarre problem converting XML files to HTML using an XSLT. The problem is only occuring in my Netscape 7.0 browser. What makes it more bizarre is that it is only...
72
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
8
by: guppywon | last post by:
I am trying to map ASP.NET execution to the ".html" extension. And I am encountering a strange error. I'm looking for help configuring my ".html" pages to execute as ".aspx" pages. I have added...
2
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is...
3
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm...
3
by: CJM | last post by:
David, Thanks for the reply. Responses inline: "David E. Ross" <nobody@nowhere.notwrote in message news:OZadnaBdOMGpYb3VnZ2dnUVZ_vOdnZ2d@softcom.net... This is a promotional mailshot so...
1
by: robnoper | last post by:
XP SP2, access and outlook 2003 I have a form with 3 command buttons on that when one is pressed it opens up a html email for the user to send. Two of the emails work fine and open with the full...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.