LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-14-2006, 08:12 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 660
Blog Entries: 6

Rep: Reputation: 31
CSS question "change color of button"


Hi
I want to change the color of the input buttons in my site..now I know that I can use CSS but thing is that if I use CSS to change the appearence of the input tag elements the input field change their color too. I do not want that to happen below is my CSS script.

body {font-family:verdana;font-size:9pt;}
td {font-family:verdana;font-size:9pt;}
a:hover {text-decoration:none;color:#FFB903;}
.border {border:1px solid black;}
input {border:1px solid black;font-size:8pt;}
select{border:1px solid black;font-size:8pt;}
submit {border:1px solid black;background:#CC6633;font-size:8pt;}

Now as you can see the background of the submit is #CC6633..but it is still appearing in typical gray..Furthermore if I change the background color of input tag the color of the button gets changed but so does the color of the input fields
 
Old 04-14-2006, 08:47 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
There is no tag called submit so your CSS is not referencing anything.

There are 2 ways around this, either use classes and define them for each element - ie:
<input class="button" type="button">
input.button:#CC6633

Or change the tag to button and define that in your CSS:
http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.5
 
Old 04-14-2006, 10:40 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 660
Blog Entries: 6

Original Poster
Rep: Reputation: 31
Thanks David for the info..I will check it out and reply
 
  


Reply

Tags
css, html


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion: Change "my posts" button to "my posts by thread" PTrenholme LQ Suggestions & Feedback 5 03-10-2006 06:49 AM
Adding a "Subscribe" button next to "Reply"? pnellesen LQ Suggestions & Feedback 2 06-21-2005 09:12 PM
"Change configuration button SaX2" ? 024742 Yoper 6 01-28-2005 07:32 AM
Change color of threads according to "subscribed" etc. JZL240I-U LQ Suggestions & Feedback 8 11-23-2004 08:03 AM
<input type="button" disabled="true" > does not work in ns4.7 or 4.9 cybercop12us Programming 2 11-29-2002 08:31 AM


All times are GMT -5. The time now is 08:50 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration