By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,738 Members | 1,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,738 IT Pros & Developers. It's quick & easy.

INPUT border: Problem

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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.