467,163 Members | 975 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,163 developers. It's quick & easy.

INPUT border: Problem

Hallo,

I use the following code to set styles for form elements:

INPUT, TEXTAREA, SELECT, OPTION {
font-family: Trebuchet, Arial, Helvetica;
font-size: 11px;
border: 1px solid threedshadow;
}

Unfortunately,

this causes also <INPUT type="checkbox"> to have thin borders, what I do not
like. Is there an easy modification to avoid this, without setting up
different, special classes.

Help needed, please!!

In Addition, is there a way to set the background-color of an option of a
select box? or the whole select box?

Kind Regards

Michael Posthoff
e-confirm
Jul 20 '05 #1
  • viewed: 14655
Share:
2 Replies
On Thu, 1 Apr 2004 11:59:39 +0200, Michael Posthoff
<po******@e-confirm-quatsch.de> wrote:
Hallo,

I use the following code to set styles for form elements:

INPUT, TEXTAREA, SELECT, OPTION {
font-family: Trebuchet, Arial, Helvetica;
font-size: 11px;
border: 1px solid threedshadow;
}

Unfortunately,

this causes also <INPUT type="checkbox"> to have thin borders, what I do
not like. Is there an easy modification to avoid this, without setting up
different, special classes.
Yes, for browsers that support the CSS2 selectors:

input[type=textbox] {border: none}

Or limit the borders to specific input types to begin with:

input[type=text], input[type=password] {border: 1px solid ThreeDShadow;}
Help needed, please!!
It is MSIE who needs extra help, in the form of classes, beacuse they have
never bothered to implement CSS2 selectors.
In Addition, is there a way to set the background-color of an option of a
select box? or the whole select box?


Yes, but afaik only Mozilla supports this.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #2
"Rijk van Geijtenbeek" <ri**@opera.com> wrote:
On Thu, 1 Apr 2004 11:59:39 +0200, Michael Posthoff
<po******@e-confirm-quatsch.de> wrote:
INPUT, TEXTAREA, SELECT, OPTION {
font-family: Trebuchet, Arial, Helvetica;
font-size: 11px;
border: 1px solid threedshadow;
}

this causes also <INPUT type="checkbox"> to have thin borders, what I do
not like. Is there an easy modification to avoid this, without setting up
different, special classes.


Yes, for browsers that support the CSS2 selectors:

input[type=textbox] {border: none}


I assume that textbox here is a typo for checkbox?
In Addition, is there a way to set the background-color of an option of a
select box? or the whole select box?


Yes, but afaik only Mozilla supports this.


Indeed. Setting styles for select and option elements is very
inconsistently supported. See http://steve.pugh.net/test/test45.html

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by J_axx | last post: by
4 posts views Thread by j.t.w | last post: by
3 posts views Thread by Gary Homewood | last post: by
10 posts views Thread by Brian Henry | last post: by
6 posts views Thread by A Traveler | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.