Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Put CSS background-color value back to default

Status
Not open for further replies.

FesterSXS

Programmer
Feb 4, 2002
2,196
GB
In my CSS I have an entry like this to set the background-color of all INPUT elements.
Code:
input          {font-size: 11px; background-color: #CEE3E6;}
However, I wish to have one single INPUT element (a button) to have the default background color. How do I return it to the default?
Code:
input.register {background-color: [COLOR=red]something here?[/color]}

Tony
________________________________________________________________________________
 
how do you mean default colour ?

If you mean the page background just use
Code:
 background-color:transparent;



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Transparent will most likely make it the background color of the element behind it.

If that doesn't work, you might want to try:

Code:
input.register {background-color: '';}

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Thanks Chris but I meant the default button color for a webpage. I think it gets this from the desktop color settings. Like the Preview Post/Submit Post buttons on this site all use the default button colors.

Tony
________________________________________________________________________________
 
clFlava,
Thanks - I have tried the following with no success...
Code:
input.register {background-color: '';}

and also...

input.register {background-color: default;}

Tony
________________________________________________________________________________
 
Then my next suggestion is this:

input {}
input.special {font-size: 11px; background-color: #CEE3E6;}

And give all your other ones the class "special".

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
I'm hoping to not have to resort to that as there are loads of Input elements within my site and it's only this one that needs a different background. I dont really want to introduce any different colors into the site either. I guess I may have to.

Tony
________________________________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top