change background color submit buttons.

Hi,

I want to change the background color of 2 types of submit button...code might be the same but don't want to ask twice.

          <input name="submit" type="submit"  align="absmiddle" style=";text-align:center"    onClick="this.form.keywords.value = this.form.search.value; this.form.action = 'http://www.domain.com/searchq.php';" value="health">

and

<button type="submit" name="submit" align="absmiddle">Search in Open Directory&nbsp;<b><?=$displayOnlyInCat?></b>&nbsp;Category</button>
LVL 4
macuser777Asked:
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.

aprestoCommented:
to be honest as far as my knowledge does, i dont think you can.  But could you not make your own buttons and make them submit the form:

<a href="javascript:document.Form1.submit()"><img...></a>
0
COBOLdinosaurCommented:
<input name="submit" type="submit"  align="absmiddle" style="text-align:center;background-color:blue;"    onClick="this.form.keywords.value = this.form.search.value; this.form.action = 'http://www.domain.com/searchq.php';" value="health">

and

<button type="submit" name="submit" align="absmiddle" style="background-color:red;">Search in Open Directory&nbsp;<b><?=$displayOnlyInCat?></b>&nbsp;Category</button>

0

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
weddellCommented:
Also , just for your info, you can assign a background image:

style="background-image: url(marble.gif) "

More information about background properties of elements can be found here:
http://www.w3schools.com/css/css_background.asp
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

macuser777Author Commented:
... I may have found a roundabout is messy way of dealing with browser problems using td's and br's....
0
macuser777Author Commented:
!!!!

sorry that message was meant to come after 1 thought i'd posted abiut an hour ago saying thatnk's very much but that I was aslo having some allignment problems..... when I post in old look It often cuts off my message of jusy doesn't accept it all now as well it seems.


Sorry, CobolDinisaur...your solution was perfect...I was just having a couple of usual mac problems which there is no need to go into again now as I have found a way around.

Thanks

macuser
0
COBOLdinosaurCommented:
Glad we could help.  Thanks for the A. :^)

Cd&
0
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
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.