us111
asked on
Submit button and background image
<input type="submit" ..... class="search" />
.search {
background-image:url(bg_bu tton_ok.gi f);
background-repeat:no-repea t;
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 ?
.search {
background-image:url(bg_bu
background-repeat:no-repea
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
Can you be a bit specific about what effect you're trying to achieve?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
background:white;
then give your button a border:
border: 1px solid #000
then give your button a border:
border: 1px solid #000
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
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?
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
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
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!
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!
ASKER
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