Link to home
Start Free TrialLog in
Avatar of us111
us111Flag for Luxembourg

asked on

Submit button and background image

<input type="submit" ..... class="search" />

.search {
   background-image:url(bg_button_ok.gif);
   background-repeat:no-repeat;
   background-position:top center;
   color:#fff;
}

Il my picture is transparent or if I have no picture, I've got a grey background. How can I disable this grey background ?

Is it a bub ?
ASKER CERTIFIED SOLUTION
Avatar of boycy
boycy
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of us111

ASKER

I tried with background:white; but....

For example, if my page background color is white I have to add a white borde around my button. this is not optimal...

background-color : transparent; works but can be buggy with Netscape
 
The transparent value for background-colour is indeed buggy with Netscape.
Can you be a bit specific about what effect you're trying to achieve?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
background:white;

then give your button a border:

border: 1px solid #000
Avatar of us111

ASKER

>>>> Over ride it by using background-color:#fff; or what ever colour you wish it to be
is the solution, not the optimal one. Anyway it works
better to use background-color and a value with # than the word like white
pigmentarts -- why do you say that? For a human reader a word is far more meaningful than a colour-value, so surely it's better to use it where possible?
Avatar of us111

ASKER

sure but depending of the browser I suppose the interpretation could be different.
I really prefer hex values

http://www.w3schools.com/css/css_colornames.asp
From your own posted link, "...W3C has listed 16 color names..."
http://www.w3.org/TR/html4/types.html#h-6.5
why, becuase of limitations:

The color names are case-insensitive., more room for mistakes, hexadecimal number (prefixed by a hash mark) is not.

If you want your pages to validate with an HTML or a CSS valuator, W3C has listed 16 color names that you can use: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. You need to use hexadecimal if you want to use other colors, you must specify their RGB or HEX value, so start of well!