How to add Stylesheets to the select tag (combo box) in html

Hi,

  I'm using the following code to add the styles to the combo box but it is not getting reflected suggest me how to add the styles to the combo boc

The code which i have used is as follows :

<html>

<style type="text/css">

cmbBox {
background-color: navy;
border: black 2px solid;
color: 00000;
font-family: arial, verdana, ms sans serif;
font-size: 18pt;
font-weight: normal
}

</style>

then..
<body>
<select class="cmbBox">

<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>

    </select>

</body>
</html>

But in the above code the style is not getting reflected

Suggest me how to add the style to the combo or give me some sample examples which would meet my requirements

Thanx
LVL 1
mohan21_kumarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edkim80Commented:
if you are using <select class="cmbBox"> your style should be of the form element.class i.e.

select.cmbBox {
etc etc.
}

Regards,
Ed
0
nwalexCommented:
Note the '.' in front of cmbBox:

.cmbBox {
background-color: navy;
border: black 2px solid;
color: 00000;
font-family: arial, verdana, ms sans serif;
font-size: 18pt;
font-weight: normal
}

neill
0
mohan21_kumarAuthor Commented:
after adding . to the style i'm able to get the style to the combo box but the border style is not getting suggest me how to add the style to the borders of the combo box

Code is as follows :

<html>

<style type="text/css">

.cmbBox {
background-color: white;
border: 10px solid;
BORDER-RIGHT: #000099 2px solid;
BORDER-TOP: #000099 2px solid;
BORDER-LEFT: #000099 2px solid;
BORDER-BOTTOM: #000099 2px solid;
color: 00000;
font-family: arial, verdana, ms sans serif;
font-size: 12pt;
font-weight: normal
}

</style>

then..
<body>
<select class="cmbBox">

<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>

    </select>

</body>
</html>
0
nwalexCommented:
If you look at this page (http://www.experts-exchange.com/Web/Web_Languages/CSS/Q_20828322.html) it suggests that you can't change the border of a 'select' box.

neill
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.